what is middleware in laravel?

1 0
2 years ago 753 views
Middleware in laravel works as a platform among the request and the response. It provides the mechanism for investigating the HTTP requests which are entering into your application. For instance, middleware in laravel ensures that the user of your particular application is authenticated. If they found that the user is not authenticated, it will redirect the user to the main login page of the application.

how to enable query log in laravel?

1 0
2 years ago 795 views
Our first step should be DB::connection()->enableQueryLog(); After our query, it should be placed $querieslog = DB::getQueryLog(); After that, it should be placed dd($querieslog)

how to make a constant and use globally?

1 0
2 years ago 677 views
You can create a constants.php page in config folder if does not exist. Now you can put constant variable with value here and can use with Config::get('constants.VaribleName');

how to extend login expire time in auth?

1 0
2 years ago 749 views
You can extend the login expire time with config\session.php this file location. Just update lifetime the value of the variable. By default it is 'lifetime' => 120. According to your requirement update this variable.

laravel - sending email

1 0
2 years ago 714 views
Laravel uses free feature-rich library SwiftMailer to send emails. Using the library function, we can easily send emails without too many hassles. The e-mail templates are loaded in the same way as views, which means you can use the Blade syntax and inject data into your templates.

session variable in laravel

1 0
2 years ago 735 views
Sessions are used to store information about the user across the requests. Laravel provides various drivers like file, cookie, apc, array, Memcached, Redis, and database to handle session data. By default, file driver is used because it is lightweight. Session can be configured in the file stored at config/session.php.

What are service providers in laravel?

1 0
3 years ago 780 views
Service providers in laravel application is the central place where application is bootstrapped. That is, laravel’s core services and our application’s services, classes and their dependencies are injected in service container through providers.

What are security of laravel?

1 0
3 years ago 768 views
Laravel is a popular development platform that is well known for performance and the active user community. Out of the box, Laravel is pretty secure. However, no framework could claim to be 100% secure, and there are always ways to improve the security of the Laravel apps.