Laravel Tricks

Browse latest tricks and tips on Laravel.

Where not in Laravel

How to use where not in clause in Laravel?WhereNotIn method of laravel db builder and Eloquent is used to select records that are not in given array.Where not in ExamplewhereNotIn ...
published on : 15 hours ago 12 Comments

Laravel get server ip

How to get the server IP with Laravel?Use below code to get IP address server in Laravel.request()->server('SERVER_ADDR'); You can also use old php way to get server ip by $_SE ...
published on : 4 minutes ago 12 Comments

Laravel phone number validation

How to validate phone number in Laravel Framework?Laravel did not provide any inbuilt validation method for validating phone no. The only way to validate phone no in laravel is thr ...
published on : 3 hours ago 12 Comments

php artisan serve stop

How to stop laravel server?Well you have started your laravel server successfully now you want to stop server. To execute php artisan serve stop simply goto your commnad line where ...
published on : 4 minutes ago 12 Comments

php artisan serve not working

How to fix php artisan serve not working ?Reasons why php artisan serve not workingYou are running php artisan serve command in wrong directory. php artisan serve is laravel comma ...
published on : 6 hours ago 12 Comments

Run raw query in Laravel.

How to use raw queries in Laravel?Laravel is an awesome framework. It provides you flexibilities for development. Once you realize it’s cool features, you will just love the fram ...
published on : 6 minutes ago 12 Comments

PHP artisan migrate command

How to Run migrations in LaravelRunning migration in Laravel is easy task. Below are few artisan commands for to run database migration in Laravel Framework. 1. php artisan migrat ...
published on : 1 day ago 12 Comments

PHP Artisan

What is php artisan?PHP artisan is the command line interface/tool included with Laravel. It provides a number of helpful commands that can help you while you build your applicatio ...
published on : 12 hours ago 12 Comments

What new in Laravel 6

Laravel 6 new FeaturesLaravel 6 comes many new features and enhancements, we have listed some themSemantic Versioning SupportCompatibility with Vapor, a serverless deployment platf ...
published on : 17 hours ago 12 Comments

Laravel migration change column type

How to change column type in Laravel MigrationIn this trick we will see how to change column data type for example we are going to change a field from varchar to longText. To do th ...
published on : 4 minutes ago 12 Comments