filmov
tv
How to Create Custom Artisan Commands in Laravel 8

Показать описание
This video will show you how to create custom artisan commands. We all know how important Artisan is when creating projects in Laravel, since it provides us a set of commands that we can use in our application. There’s a command which allows you to create custom artisan commands. In this video, we’re going to interact with the database through Eloquent in order to create a new product. We’re also going to cover the different return messages, printing out data as a table, how to add a progress bar in your iteration, and we’re going to use the Artisan command inside our “normal code”.
Resources
Get up to 1 Month Free Hosting by using code "DARY15" and get $15 free hosting credit.
Cloudways offers peace of mind and flexibility so you can focus on growing your business and reaching new milestones instead of dealing with server management. With Cloudways, you get an optimized stack, managed servers, backups, staging environment, integrated Git, pre-configured, Composer, 24/7 support, and the choice of five cloud providers: AWS, DigitalOcean, Linode, Google Cloud, and Vultr.
Coding Gear
Recording Gear
Timestamps
00:00 Introduction
01:17 Creating our own command
03:04 Sponsor of today’s video
03:40 Adding a command parameter in our make:command
04:49 Defining our command
06:04 Creating a database & migration
07:55 Creating a product with our custom command
11:14 Custom Show All Products command
12:53 info(), comment(), error() & line() methods
15:34 Printing out data as a table
17:40 Progress bar
20:55 How to use artisan commands in normal code
▬▬▬
#cloudhosting #managedhosting #cloudways #laravel
Resources
Get up to 1 Month Free Hosting by using code "DARY15" and get $15 free hosting credit.
Cloudways offers peace of mind and flexibility so you can focus on growing your business and reaching new milestones instead of dealing with server management. With Cloudways, you get an optimized stack, managed servers, backups, staging environment, integrated Git, pre-configured, Composer, 24/7 support, and the choice of five cloud providers: AWS, DigitalOcean, Linode, Google Cloud, and Vultr.
Coding Gear
Recording Gear
Timestamps
00:00 Introduction
01:17 Creating our own command
03:04 Sponsor of today’s video
03:40 Adding a command parameter in our make:command
04:49 Defining our command
06:04 Creating a database & migration
07:55 Creating a product with our custom command
11:14 Custom Show All Products command
12:53 info(), comment(), error() & line() methods
15:34 Printing out data as a table
17:40 Progress bar
20:55 How to use artisan commands in normal code
▬▬▬
#cloudhosting #managedhosting #cloudways #laravel
Комментарии