### Generate a New Listener Source: https://titan-web-framework-v2.azderus.io/doc.html/console Use the `make:listener` command to create a new listener file. Provide the desired listener name, and it will be generated with a basic `handle` method structure in the `App/Listeners` directory, ready to respond to events. ```bash # --- /App/Listeners/Email.php dosyasını oluşturur --- # $ php titan make:listener Email ``` ```php // --- [*] /App/Listeners/Email.php --- // namespace App\Listeners; class Email { public function handle() { } } ``` -------------------------------- ### List Available Console Commands Source: https://titan-web-framework-v2.azderus.io/doc.html/console This command displays a comprehensive list of all console commands available within the Titan Web Framework. It should be executed from the framework's root directory in the terminal to see all executable operations. ```bash $ php titan -h ``` -------------------------------- ### Generate a New Controller Source: https://titan-web-framework-v2.azderus.io/doc.html/console The `make:controller` command facilitates the creation of new controller files. You can specify the controller's name, optionally including a subdirectory path, to organize your application's controllers within the `App/Controllers` directory. This command generates a basic controller class structure. ```bash # --- /App/Controllers/UserController.php dosyasını oluşturur --- # $ php titan make:controller UserController # --- App/Controllers/Frontend/UserController.php dosyasını oluşturur --- # $ php titan make:controller Frontend/UserController ``` ```php // --- [*] /App/Controllers/Frontend/UserController.php --- // namespace App\Controllers\Frontend; use View; class UserController { public function index() { } } ``` -------------------------------- ### Generate a New Model Source: https://titan-web-framework-v2.azderus.io/doc.html/console Use the `make:model` command to create a new model file for your application. Simply provide the desired model name, and the command will generate a basic model class structure within the `App/Models` directory, ready for database interactions. ```bash # --- /App/Models/User.php dosyasını oluşturur --- # $ php titan make:model User ``` ```php // --- [*] /App/Models/User.php --- // namespace App\Models; use DB; class User { } ``` -------------------------------- ### Generate a New Middleware Source: https://titan-web-framework-v2.azderus.io/doc.html/console The `make:middleware` command creates a new middleware file. Specify the middleware's name, and it will be generated with a basic `handle` method structure in the `App/Middlewares` directory, ready for request filtering. ```bash # --- /App/Middlewares/Auth.php dosyasını oluşturur --- # $ php titan make:middleware Auth ``` ```php // --- [*] /App/Middlewares/Auth.php --- // namespace App\Middlewares; class Auth { public static function handle() { } } ``` -------------------------------- ### Generate a Random Application Key Source: https://titan-web-framework-v2.azderus.io/doc.html/console The `make:key` command generates a new 128-bit random key. This key is crucial for application security, often used for encryption, session management, or other cryptographic operations within the framework. ```bash $ php titan make:key ``` -------------------------------- ### Clear Application Cache Directory Source: https://titan-web-framework-v2.azderus.io/doc.html/console The `clear:cache` command is used to remove all files from the application's cache directory. This is useful for ensuring that your application is using the latest data and for troubleshooting caching-related issues. ```bash $ php titan clear:cache ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.