Category

Laravel

Category

Step 1: Install Laravel 6 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel6 Step 2: Going inside of project using the command cd laravel6 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel6 DB_USERNAME=root [email protected] Step 4: Route Setup Here I am going to create routes to get and post method. now open “routes/web.php” file and put below code.…

Step 1: Install Laravel 6 Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel6 Step 2: Going inside of project using the command cd laravel6 Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel6 DB_USERNAME=root [email protected] Step 4: Create employee_images Table and Model also. Here, I have created migration for employee_images using Laravel 6 php artisan command, you can check…

Step 1: Install Laravel Project I am going to install a laravel project using composer. composer create-project –prefer-dist laravel/laravel laravel7datatables Step 2: Going inside of project using the command cd laravel7datatables Step 3: Setup MySQL database Now, configure this database in the .env file. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel7datatables DB_USERNAME=root [email protected] I have done local database credentials. Now migrate database php artisan migrate Step 4: Install yajra Package We going to install the yajra/laravel-datatables-oracle package by…

Add code inside of your controller and make the function this easiest way to make custom messages in methods when you want to validate requests: public function create() { request()->validate([ ‘name’ => ‘required’, ‘description’ => ‘required’ ], [ ‘name.required’ => ‘A name is required’, ‘description.required’ => ‘A description is required’ ]); }

1) What is Laravel? Laravel is a free open source “PHP framework” based on MVC design pattern. Laravel has inbuilt features like Eloquent ORM, Blade Template engine, Built-in command-line tool “Artisan”, database structure and build their migration. 2) What are the pros and cons of using the Laravel Framework? Built-in command-line tool “Artisan” for creating a code skeleton, database structure and build their migration.Laravel Framework has in-built lightweight blade template engine to speed up compiling…