Category

Laravel 6

Category

Laravel is a structure and it is really quick and fast. It is referred to as an improved and better framework. Laravel makes use of Eloquent because of which writing the database queries becomes easy. So it’s better to know the framework of laravel to make the things quick and fast and better in use. WordPress is referred to as mainly slow because of the use of plugins. WordPress is cheap and performance loads are…

Ajax Autocomplete Search in Laravel 7 Step 1: Install laravel 7 using composer composer create-project –prefer-dist laravel/laravel laravel7search Step 2: Going inside of project using the command cd laravel7search 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=laravel7search DB_USERNAME=root DB_PASSWORD=root@123 Step 3: Create Migration and Model In this step, we have to create a migration for students table using Laravel 7 PHP artisan command, so first fire…

Today, I am going to show you how to create a custom 404 page in laravel 7.First, you need to create a page inside of resources/views/errors/404.blade.phpNow, Code inside of 404.blade.php <!DOCTYPE html> <html lang=”en”> <head> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css”> <script src=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js” ></script> <style type=”text/css”> *{ transition: all 0.6s; } html { height: 100%; } body{ font-family: ‘Lato’, sans-serif; color: #888; margin: 0; } #main{ display: table; width: 100%; height: 100vh; text-align: center; } .fof{ display: table-cell;…

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 DB_PASSWORD=root@123 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 DB_PASSWORD=root@123 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…

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’ ]); }