Laravel 6.0 introduces a new method Gate::inspect. This makes it easier to provide custom messages to users during authorization requests, such as a specific error message if their request was denied. We can use it for policy.
Laravel Concepts – Policy, Event, Listener
There are bunch of advanced Laravel features and we will use them in real-world projects. Policy, Event, Listeners are widely used Laravel features. Laravel Policies are a great way to protect actions on your Eloquent Model. Laravel Policies are the part of Laravel Authorization that helps you to protect resources from unauthorized access. Laravel’s events …
Laravel – Speed of Running Eloquent
If you call repeatedly relationship model attributes, it will affects to response speed. Because laravel will connect database and tables whenever you call relationship model attributes. So, in this case, you must build one SQL for getting all available attributes from all relationship models. For example: @foreach ($posts as $post) {{ $post->author->fullName }}@endforeach This is …
laravel-cors
The laravel-cors package allows you to send Cross-Origin Resource Sharing headers with Laravel middleware configuration. Features Handles CORS pre-flight OPTIONS requests Adds CORS headers to your responses Resource: https://github.com/barryvdh/laravel-cors
Vat calculation easy :)
When you work for EU company, vat validation and calculation is mandatory in payment module. Here is very good php vat support repository. https://github.com/mpociot/vat-calculator This works best with laravel and laravel cashier. Charming!
Laravel Scout
Laravel Scout provides a simple, driver based solution for adding full-text search to your Eloquent models. Using model observers, Scout will automatically keep your search indexes in sync with your Eloquent records. Currently, Scout ships with an Algolia driver; however, writing custom drivers is simple and you are free to extend Scout with your own search implementations.
Laravel 5 Async Queue Driver
It is an easy stuff to implement the asynchronization in Javascript since it provides it by default, but not an easy stuff in PHP. When we need to implement the asynchronization in laravel framework, we can use the following library which is powerful and suitable. https://github.com/barryvdh/laravel-async-queue Just like the ‘sync’ driver, it is not a …
Laravel Dusk Test for Iframe
Some Time you can create Browser tests by using laravel dusk. Generally dusk provides almost functionalities for Browser test. You can do following as when you are going to test for iframe. Iframe name = stripe_checkout_app $browser->driver->switchTo()->frame(‘stripe_checkout_app’);
Laravel Home Stead
Laravel strives to make the entire PHP development experience delightful, including your local development environment. Vagrant provides a simple, elegant way to manage and provision Virtual Machines. Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on …