From the course: Advanced Laravel
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Make use of logs - Laravel Tutorial
From the course: Advanced Laravel
Make use of logs
- [Instructor] I have now logged in as an instructor. Let me schedule a class that we would like to delete. So choose Dance Fitness, choose some later date, choose some time and schedule. All right, now let me make five bookings for this class so that we can build and test the class cancellation feature correctly. And to make the bookings, I'll use Tinker. If you've never used Tinker, it's a command line tool in Laravel that allows developers to interact with the application's code and data. Let me enter the Tinker environment using sail artisan tinker. Here, we can write any code and execute it just like we do within the application. So let me first get the ID of the class we just scheduled using id equals ScheduleClass::latest first id. Okay, and it is 12. All right, now let me get a collection of five members or even three members. Members equals User::where role is member and take three, get. Okay. And…