Category: Laravel
-
Angular Material Datatables example with Laravel 5.6 API Data
Hello to all, welcome to therichpost.com. In this post, I will tell you, Angular Material Datatables example with Laravel 5.6 API Data. I am doing this with Angular 6 and hope this will help other. By my point of view this is very interesting post for me. I also added bootstrap feature in it and you…
Written by
-
How to generate PDF from html view file in laravel? the rich post
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to generate PDF from html view file in laravel? Here are the following steps to generate PDF from html view file in laravel? the rich post: 1. Need to install laravel-dompdf package with below command: composer require barryvdh/laravel-dompdf 2. After installing laravel-dompdf package you…
Written by
-
Laravel pagination using mysql limit offset
Hello to all, welcome to therichpost.com. In this post, i will tell you, Laravel pagination using mysql limit offset. Laravel is the top mvc framework in php. Here is working and tested code for Laravel pagination using mysql limit offset: // Paginate $limit = 2; //$_GET[‘page’] – get page number form url like – www.therichpost.com?page=1 $offset =…
Written by
-
How to pass laravel route to controller with multiple parameters?
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to pass laravel route to controller with multiple parameters? Laravel is the best php mvc framework. In this post, we will send multiple parameters to controller from laravel route. Here is complete working and tested code: web.php file code: Route::get(‘/payment-summary/filter/{startDate}/{endDate}/{location}/{staff}/{voucher}’,’Reports\Finances\PaymentSummaryController@getFilterResponse’); PaymentSummaryController.php file code:…
Written by
-
laravel scheduler with delete query
Hello to all, welcome to therichpost.com. In this post, I will tell you, laravel scheduler with delete query. Your task schedule is defined in the app/Console/Kernel.php file’s schedule method. Laravel scheduler is the very feature of laravel which makes cron jobs easy to handle and code. Here is example working query for laravel scheduler with delete query: $schedule->call(function ()…
Written by
-
Laravel Create a custom middleware class that checks the user’s role
Hell to all, welcome to therichpost.com. In this post, I will tell you, how to Create a Laravel custom middleware class that checks the user’s role? Laravel now a days top php mvc framework. I am also learning laravel. Here we start the code for Laravel custom middleware class that checks the user’s role: 1. First, we will…
Written by
-
How to upload image in Laravel?
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to upload image in Laravel? I am doing with laravel first time in my website. Laravel is one of the top php mvc framework. In this post, I am uploading the image public folder by form post. Here is the working…
Written by
-
How to get date difference in hours and days with laravel carbon?
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to get date difference in hours and days with laravel carbon? Like I always say that laravel is the best Mvc php framework. Carbon class is inherited from the PHP DateTime class. Here is working and tested code and you can…
Written by
-
How to Split Laravel Routes into Multiple Files?
Hello to all, welcome to therichpost.com. In this post, I will tell you, How to Split Laravel Routes into Multiple Files? Laravel is one of the top php mvc framework and growing very faster. First, we need to check route files defined in app/Providers/RouteServiceProvider.php. In that file, there are two functions called mapWebRoutes() and mapApiRoutes(). Those…
Written by
-
Laravel Route with variable
Hello to all, welcome to therichpost.com. In this post, I will tell you, Laravel Route with variable. Like I always say that laravel is the best Mvc php framework. Here is the working route code and you can set variable in laravel routes and use it anywhere: //web.php code: Route::get(‘/test/{id?}’, function ($id = 1) {…
Written by