In this video, learn how to write a new interactive Laravel Artisan Console command that enables you to interact with the job in a REPL fashion where you can read, evaluate, print, and repeat this action multiple times in a loop.
- [Instructor] The last thing we'll build with our console … is the ability to ask questions … and get answers from our users. … It might be useful for some of your console commands … to be interactive for instance. … In our case, maybe we want to provide a way of asking … which ways that we want to notify our users. … Maybe we'll build out the ability … to send either a text message or an email. … Let's open up our text editor … and our command that we've been working with thus far, … at app, console, commands, … and email reservations command.php. … We'll scroll down into our handle function, … and on line 42, let's try seeing … how we can ask a basic question via the console … and pass the answer back to our code. … Laravel provides a function for us to do this, … as you might suspect. … We have answer is going to be equal to … this arrow ask, … in parenthesis, and then in quotes, … what service should we use? … Add our semicolon at the end, … and then we'll add after that, … just a var_dump, …
Author
Released
12/16/2019- Saving and viewing files
- Displaying validation errors
- Console commands, outputs, arguments, and inputs
- Building a Laravel route that has multiple parameters
- Working with the Laravel authentication system
- Preparing for deployment
Skill Level Intermediate
Duration
Views
Related Courses
-
Advanced Laravel
with Justin Yost2h 20m Advanced -
Building RESTful APIs in Laravel
with Justin Yost2h 19m Intermediate -
PHP: Creating Secure Websites
with Kevin Skoglund4h 15m Intermediate -
Ajax with PHP: Add Dynamic Content to Websites
with Kevin Skoglund3h 37m Intermediate
-
Introduction
-
1. Beyond the Basic Form
-
Saving files10m 11s
-
Viewing files3m 51s
-
Validation6m 6s
-
Displaying validation errors4m 33s
-
Displaying old input3m 25s
-
-
2. Artisan Console
-
Console commands5m 43s
-
Console outputs5m 1s
-
Console arguments5m 22s
-
Console options4m 32s
-
Console inputs5m 54s
-
-
3. Service Container
-
Service providers6m 39s
-
Facades4m 9s
-
-
4. Testing
-
Basic test5m 12s
-
Database factories10m 9s
-
As a user3m 41s
-
Facades5m 47s
-
File uploads5m 45s
-
Console commands9m 14s
-
-
5. Notifications
-
Emails8m
-
Notifications5m 34s
-
Queue jobs6m 2s
-
Queue workers5m 41s
-
Task scheduler6m 25s
-
-
6. Routing
-
Route parameters5m 56s
-
Route model binding3m 33s
-
Middleware4m 29s
-
-
7. Laravel Mix
-
CSS processing6m 20s
-
JavaScript processing4m 36s
-
8. Security
-
Authentication4m 56s
-
Route authorization4m 43s
-
Verified users2m 58s
-
Encryption3m 20s
-
Password storage7m 17s
-
-
9. Deployment
-
Preparing for deployment5m 37s
-
Databases4m 54s
-
Deploying a change1m 20s
-
-
Conclusion
-
Next steps1m 5s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Console inputs