-
Notifications
You must be signed in to change notification settings - Fork 3
Extra information's
Some Performance Tips for Filament
To optimize the performance of the Filament app, you can use the php artisan icons:cache
command to cache icons. This command preloads and caches the icons used in your application, resulting in faster load times.
php artisan icons:cache
If you're experiencing performance issues and want to speed up your application, consider disabling the view collection feature in the Debugbar. Here's how you can do it:
-
Navigate to the
debugbar.php
configuration file located in theconfig
directory of your app. -
Inside the
debugbar.php
file, you'll find an array namedcollectors
. Locate the'views'
collector within this array. -
To disable the view collection, simply set the
'views'
collector tofalse
, like this:
'collectors' => [
...
'views' => false, // Views with their data
],
This change will prevent the Debugbar from collecting and displaying view data, which can help improve the performance of your application, particularly in a development environment.
This project provides additional Artisan commands to simplify your workflow and enhance productivity.
Generate general IDE helper files for improved code autocompletion and navigation by running:
php artisan ide-helper:generate
Generate IDE model helper files without writing to model files using:
#use any one of this two commands
php artisan ide-helper:models -N
php artisan ide-helper:models --nowrite
php artisan csfixer:run
This command ensures that your code adheres to the predefined coding standards, making your codebase clean and readable.
Creating services for your application is made effortless. Use the following command to generate a service:
php artisan make:service subfolder/ServiceName
Replace subfolder and ServiceName with the actual values you need. You can also create a service without a subfolder:
php artisan make:service TestService
The newly created service will be located at app/Http/Services/TestService.php
, ready to handle your application's business logic.
Traits are reusable code components that enhance code organization. To create a new trait, simply run:
php artisan make:trait TestTrait
This command generates a new trait file for your project, promoting code reusability and maintainability.
Leverage these Artisan commands to streamline your development process and maintain a well-structured codebase.