Learn how to put your application into maintenance mode using the down command. By creating a file named down in the framework storage path, you can ensure your application is temporarily unavailable. Discover how this command parallels the php artisan down command.
The dump command in Laravel's Tinker REPL is used to display information about a variable or class instance in the console window. It utilizes Symfony's VarDumper console component. The dd helper function is also available in Tinker, providing useful output in the context of a Laravel application.
Learn how to use the env command in Laravel to retrieve the name of the current framework environment. The environment name is specified in the .env file and can be accessed using the APP_ENV entry. This command is similar to php artisan env.
Learn how to use the history command in the Tinker REPL session to retrieve previously entered commands. With its options, you can easily search, replay, and even save commands to a file. Check out this example session and explore the various options available to streamline your workflow.
Learn how to use the ls command to obtain information about variables, constants, functions, classes, interfaces, traits, properties, and methods in PHP. Discover how to use the ls command without any options to list defined variables in the current scope. Understand that the ls command can be used to inspect object instances to learn about their properties and methods. Find out that using the ls command with non-object types will result in an error. Explore an example using the ls command on an Eloquent model instance to display class constants, properties, and methods. Discover that the ls command offers various options and filters to narrow down the output, such as viewing only properties of an Eloquent model.
Learn how to use the migrate command in Laravel to run migrations against the database. With options like --database to specify the database connection, --force to run migrations in a production environment, and --pretend to display SQL queries instead of running migrations, this command provides flexibility. Additionally, you can use flags like --seed to execute the db:seed command after running migrations and --step to increment the migration's batch number for rollback purposes.
Learn how to use the optimize command in Laravel to improve the performance of your application. This command offers two flags: --force to write the compiled class file, and --psr to disable the optimized class map loader. The compiled files cache is stored in bootstrap/cache/compiled.php. Find out how to implement these options in your development environment and increase the efficiency of your Laravel application.
The show command allows you to view the code behind functions, classes, objects, constants, methods, and properties in Laravel. It can be used to see the code for a specific function, like the can method in an Eloquent model, or for functions in the global namespace, like the dd helper function. You can even use it to see the entire class definition, such as when viewing the code behind a default Eloquent model like App\User.
Learn how to use the throw-up command in Tinker to re-throw exceptions out of a REPL session. This command can be used to throw the last occurred exception or a specific exception instance. Get started with this helpful feature today.
The trace command in Laravel allows you to show the current call stack. By default, it displays the last 10 lines of the call stack. However, you can customize the number of lines displayed using the -n option. For example, to show the last 20 lines, you can use the -n20 option. And if you want to view a specific range of the call stack, you can provide an option like -n5-20.
Wrapping up Forte Phase 0 with the lexer and parser now in private alpha, and kicking off Phase 1 wi...
Read moreA Forte development update: the parser now supports backtracking, improvements to node metadata, ide...
Read moreWrapping up attribute parsing in Forte's HTML parser, from simple HTML attributes to complex, edge-c...
Read moreExploring how Forte's parser extensions can be used to handle complex Blade directives like nested s...
Read moreDigging into parsing Blade and HTML comments while building Forte's HTML parser for Laravel Blade.
Read moreThis week I’m tackling Forte's HTML parser - consolidating Blade, Flux, and Livewire components into...
Read more