ItSolutionStuff.com

Laravel 10 Create View File using Artisan Command Example

By Hardik Savani • November 5, 2023
Laravel

Hello Dev,

This example is focused on how to create blade file in laravel 10 using cmd. It's a simple example of php artisan make:view laravel 10. you will learn how to create view file in laravel 10. I would like to show you laravel 10 create view file using terminal. follow the below step for laravel 10 create blade file using command.

Laravel has recently launched version 10.23, which includes a notable enhancement: the addition of a new Artisan command option for creating Blade files. You can now generate a view file in Laravel 10 by executing the following straightforward command: php artisan make:view welcome. This command simplifies the process of creating Blade files via the Artisan command.

So, let's see the simple example below:

Example 1: Laravel 10 Create Blade File Command

Here, the below command will help you to create 'dashboard.blade.php' file. so, let's run it and check the output as well.

php artisan make:view dashboard

You can see the following output:

they will create new file as like the below:

resources/views/dashboard.blade.php

<div>

<!-- Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi -->

</div>

Example 2: Laravel 10 Create Blade File inside Directory Command

Here, the below command will help you to create 'index.blade.php' file in users folder. so, let's run it and check the output as well.

php artisan make:view users.index

You can see the following output:

they will create new file as like the below:

resources/views/users/index.blade.php

<div>

<!-- He who is contented is rich. - Laozi -->

</div>

These commands really help us.

I hope it can help you...

Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

Laravel 10 Auto Load More Data on Page Scroll using AJAX Example

Read Now →

Laravel 10 Ajax File Upload with Progress Bar Tutorial

Read Now →

Laravel 10 Livewire CRUD using Jetstream & Tailwind CSS

Read Now →

Laravel 10 Drag and Drop File Upload with Dropzone JS

Read Now →

Laravel 10 Middleware Tutorial Example

Read Now →

Laravel 10 ChartJS Chart Example Tutorial

Read Now →

Laravel 10 One to Many Eloquent Relationship Tutorial

Read Now →

Laravel 10 Multi Auth: Create Multiple Authentication in Laravel

Read Now →

Laravel 10 Many to Many Eloquent Relationship Tutorial

Read Now →

Laravel 10 Socialite Login with Google Account Example

Read Now →

Laravel 10 Send Email using Queue Example

Read Now →

Laravel 10 Database Seeder Example Tutorial

Read Now →

Laravel 10 File Upload Example Tutorial

Read Now →