In this article, We’ll see how to check the laravel version using CLI and file. Method 1: Check Laravel Version using CLI / Command Prompt Method 2: Check Laravel Version using file Open the below file in any editor. /vendor/laravel/framework/src/Illuminate/Foundation/Application.php In this file you will find the following That’s it!. Please share your thoughts orRead more about How to Check Laravel Version by CLI and File[…]
To get the sql query, we can use enableQueryLog static method to print query. We can use: Or We can use toSql() to print the sql query. return select * from products That’s it!. Please share your thoughts or suggestions in the comments below.
Laravel 7 released on Tue, 3 Mar 2020 and it includes many new features including Laravel airlock, speed routing, better eloquent, blade component tags and many more. According to Release Notes, new packages, improvements and features in Laravel 7 are as follows: Laravel Airlock by Taylor Otwell Custom Eloquent Casts Blade Component Tags HTTP ClientRead more about Laravel7 Features[…]
In this article, We’ll see how we can get the client ip address in laravel. Simply, We can use the Request object. Just call its ip() method. Below an example: That’s it!. Please share your thoughts or suggestions in the comments below.
In this article, We’ll see how we can create a custom blade directive in laravel. Blade allows you to define your own custom directives using the directive method. In laravel’s documentation, a new blade directive creates under boot method in AppServiceProvider.php, but we’ll create a new provider, so lets create it using artisan command. addRead more about How to create custom blade directive in laravel ?[…]
In this article, We’ll see how to use Laravel Database Seeding? Seed allows you to insert data into your database. We can use the query builder to manually insert data or Eloquent model factories. To generate a seeder, execute the make:seeder Artisan command. All seeders will be placed in your database/seeds directory. Let’s assume weRead more about How to use Laravel Database Seeding?[…]
In this article, We’ll see how to use Laravel Tinker? Tinker allows you to interact with your entire Laravel application on the command line, including the Eloquent ORM, jobs, events, and more. Tinker is the Laravel’s built-in feature, We don’t need to install them separately. Let’s create a table i.e ‘subjects’ in the database usingRead more about How to use Laravel Tinker?[…]
Laravel is a open-source web application framework with expressive, elegant syntax. Laravel uses the Model-View-Controller approach, which allows great separation between logic and presentation. In this article, we’ll see step by step – How to install laravel? At first you must have composer installed on your system. Composer is an application-level package manager for theRead more about How to Install Laravel – The PHP Framework[…]