we are going to from scratch so, we need to get fresh Laravel 5.5 application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project --prefer-dist laravel/laravel blog Step 2: Create Post Table and Model next, we require to create migr...
Laravelcomes with built-in tools to automate and simplify the migration process. In this guide, we’ll go in-depth on how to create, run, and manage migrations inLaravel applications. If you’re just getting started with Laravel but still want to try out ButterCMS, check out ourLaravel st...
Using PWA with Laravel, you can make your website act more like a mobile app while retaining all the features of a traditional website.PWA may boost site performance by 63%, with anaverage load time of 2.75 seconds, according to the data. Additionally, it has the potential toboost user ...
In Laravel 5 REST API project sometime we need to create create our own custom header for security. like : 'X-hardik':'123456'. this was example, that means in your current project your every request with pass your own custom header like i give you example.this custom ...
Create a route: Define a route in your routes/web.php or routes/api.php file to handle the form submission. For example, you can define a POST route like this: 1 Route::post('/submit-form', 'FormController@submitForm'); Create a controller: Generate a new controller using the followin...
this gets stored forever. A more suitable solution would be to use environment variables. Thankfully, in Laravel, we can create an environment variable in our.envfile and reference it in our code whenever we need it. So we create a newFACEBOOK_API_KEYin our .env file and use it in ou...
Next, create a database migration to set up thelinkstable.Laravel Migrationsallow developers to programmatically create, update, and destroy database tables, working as a version control system for your database schema. To create a new migration, you can run themake:migrationArti...
Create Seeder in Laravel 8 Laravel provides the functionality to create the seeders using the make command. Here, we will create a seeder for the table. So, the seeder name must ressemble to the table. Here, I have the Employees table. That’s why, I will create the seeder specifically...
We will be using the Laravel WebSockets package which is a great replacement for Pusher. The Laravel WebSockets package emulates the Pusher API and allows you to easily connect to the WebSockets server and subscribe to channels, just as you would with Pusher. The best way of using the ...
Type the below command to open Tinker, which will interact with our laravel application. php artisan tinker Now, we will generate 100 fake users using this command: \App\Models\User::factory()->count(100)->create(); If you execute the above command, you will see like this: If you go...