Laravel 5.5 – Custom Blade::if() Directives

In Laravel 5.5, writing custom blade if Directives is pretty easy. Using this new feature, you can write simplified and clean if statements in your views. Imagine, you have to check, if the user is admin or not, in this […]

Laravel 5.5 – DD and Dump in Collections

Laravel offers two new useful debugging methods dump() and dd() as part of Laravel 5.5 version release. These methods are added to Collections, it means you can call dump() and dd() on collection instances. In previous […]

Laravel 5.5 – Optional Objects

Laravel 5.5 includes a new Optional class with a new helper() function, which you can think of as a generic null object implementation. The point of the optional() class and helper is to prevent situations like where you […]

Laravel 5.5 – Dynamic templates with View::first

Laravel 5.5 is introduced a new feature called dynamic view loading and it makes your controllers simple and more expressive when dealing with dynamic templates. Using This feature we can avoid plain old conditional statements […]

Laravel – Generate PDF file from view

We gonna use barryvdh/laravel-dompdf Laravel package to generate PDF files from view file. This package is just a wrapper around DOMPDF library. Installtion Use below composer command to install the package After installing […]

Laravel 5.5 – The Route::redirect method

Laravel 5.5 introduced new Router class method called redirect, which gives the flexibility to redirect to other URLs directly without creating a controller or closure. How to use Route::redirect() Let’s define a […]

Laravel 5.5 – The Route::view method

Laravel 5.5 introduced new Router class method called view, which gives the flexibility to render the view file directly without creating a controller or closure. This is not a great big feature, but it simplifies your […]

How to force download files in Laravel?

Giving download option to the user is a pretty common requirement in today’s web apps for the variety of reasons. For example, if your application is related to online shopping, you might need an invoice download […]

How to Create APIs in Laravel 5.5 using API resources

In this post, I will show how easy it is to use API resources to build REST APIs. In the previous Laravel REST API tutorial, I have used Fractal 3rd party library to control API response data. In Laravel 5.5, we now have […]

Build REST apis with Laravel 4.2

Create a brand new Laravel Project with below command Configure Your Database Open config/database.php file and update it with your database details as shown below Create Migration files and tables We gonna have users […]

Laravel 5.5 New feature- Fresh Migrations

In Laravel 5.5 a new Artisan command added to migrate: namespace. This is similar to the existing migrate:refresh option, however, rather than rolling back your existing migrations, migrate:fresh drops all the table and […]

Laravel – .env Variables

Laravel utilizes the DotEnv PHP library by Vance Lucas. Using this library we can easily configure the application settings and we can have different configuration values based on the environment where the application […]

How to Clear cache in Laravel 5

Here I am gonna show you few artisan commands which will help you to clear different caches in your Laravel application. Clear Application Cache To clear application cache use the php artisan cache:clear command. Generally […]

DMCA.com Protection Status