Search

The blog - deep space.

Laravel Artisan Generator Command: The make:notification Command

Dec 7, 2016

The make:notification command helps generate a new notification class in Laravel. When using this command, a name must be provided, which will be the name of the newly created class. The command creates a new file at app/Notifications/StorageQuotaNotification.php and generates a class named StorageQuotaNotification. If the provided class name already exists, an error will be issued. The command can handle nested namespaces and directories as well.
Laravel Artisan Generator Command: The make:policy Command

Dec 7, 2016

The make:policy command in Laravel is used to create policy classes. By providing a name, you can generate a new policy class, which will be stored in the app/Policies directory. The command can also generate namespaced classes by using the \ separator in the policy name. Existing policy classes with the same name will not be overwritten, and an error message will be displayed instead.
Laravel Artisan Generator Command: The make:provider Command

Dec 7, 2016

The make:provider command in Laravel allows you to create new service providers for your application. By providing a name, a new service provider class and file will be generated and stored in the app/Providers directory. Existing service provider classes with the same name will not be overwritten. The command is also capable of generating namespaced classes by separating namespace sections using \ . A nested directory will be created and the correct namespace will be set on the generated class.
Laravel Artisan Generator Command: The make:request Command

Dec 7, 2016

The make:request command in Laravel allows you to generate new request validation classes. You can specify a name for the class, which will be used as both the class name and the file name. The command also supports generating namespaced classes by using the \ separator when specifying the request name. If a request class with the same name already exists, an error will be displayed.
Laravel Artisan Generator Command: The make:seeder Command

Dec 7, 2016

Learn how to generate new seed classes using the make:seeder command in Laravel. By providing a name argument, you can ensure that the generated file and class have the desired name. The generated seeder classes are stored in the database/seeds/ directory by default. If a seeder class with the same name already exists, you will receive an error message. To create a seeder class within nested directories, separate the directory sections using \ . Please note that seeder classes are not namespaced by default.
Laravel Artisan Generator Command: The make:test Command

Dec 7, 2016

Learn how to quickly generate test files for your application using the make:test command in Laravel. This command allows you to create new test files and generated classes easily. The generated tests are stored in the tests/ directory by default and will not overwrite any existing test classes with the same name. You can also generate test classes within nested directories by separating directory sections using \ . Remember, test classes are not namespaced by default.
Laravel Artisan: Interacting With Commands

Dec 7, 2016

Learn how to interact with Artisan console commands in Laravel. This article covers executing a command, entering data, and supplying array data. To execute a command, you need to invoke the Artisan console application by typing php artisan followed by the command name. You can also use shorthand commands and shortcuts. When entering data, make sure to enclose values with spaces in quotes. If a command requires multiple pieces of information stored in the same input argument, you can supply array data by separating values with spaces or by using the option name to preface the values.
Laravel Artisan Key Command: The key:generate Command

Dec 7, 2016

The key:generate command generates a random key that is used for encryption in the application. The generated key can be updated in the application's environment file. There is also an option to simply display the generated key without updating any configuration files. Regenerating the encryption key is not recommended, but in some cases, it may be necessary to decrypt old data and reapply encryption with the new key.
Laravel Artisan Migration Command: The migrate:install Command

Dec 7, 2016

The migrate:install command creates a migrations database table in Laravel. You can specify the database connection to use with the optional database parameter. By default, it uses the connection specified in the database.default configuration entry. An example is provided to illustrate the usage of the migrate:install command. After executing the command, a migrations table with a similar structure will be created.
Laravel Artisan Migration Command: The migrate:refresh Command

Dec 7, 2016

Learn how to reset and run all outstanding migrations using the migrate:refresh command in Laravel. This command is a convenient shortcut to calling two separate Artisan commands. You can customize the behavior of migrate:refresh using various options and flags, such as specifying the database connection, forcing migrations to run in a production environment, specifying the path to the migrations file, and more. Additionally, you can execute the db:seed command after the migrate:refresh command by using the --seed flag or supplying a value for the --seeder option.
Laravel Artisan Migration Command: The migrate:reset Command

Dec 7, 2016

Learn how to use the migrate:reset command in Laravel to roll back all the migrations in your application. Customize the behavior of the reset using options such as specifying the database connection, running in a production environment, or displaying SQL queries without actually performing any operations. Follow the provided examples to understand how to use the command with different options.
Laravel Artisan Migration Command: The migrate:rollback Command

Dec 7, 2016

Learn how to use the migrate:rollback command in Laravel to undo the last database migration. This command supports various options and flags, such as specifying a custom database connection, forcing migrations in a production environment, or previewing the SQL queries that would be executed. Check out the provided examples to see how to use these options effectively. The migrate:rollback command automatically reverts the migrations with the highest batch number, removing any migrations with the same highest batch number.
Laravel Artisan Migration Command: The migrate:status Command

Dec 7, 2016

Learn how to check the status of each migration using the migrate:status command in Laravel. This command displays a table with indicators for each migration, showing whether it has been executed or not. You can also customize the command with options to check migrations on different database connections and in different locations. For convenience, default values are provided for the database connection and migrations path options.
Laravel Artisan Queue Command: The queue:failed Command

Dec 7, 2016

The queue:failed command in Laravel allows you to easily list all failed queue jobs stored in the failed_jobs database table. When executed, the command displays a table with details including the job ID, queue connection, job class, and failure date. In case there are no failed jobs, the command outputs a message indicating it.

Some absolutely amazing
people

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.