what is middleware in laravel?

1 0
2 years ago 754 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 796 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 679 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 716 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.