# Plugin Aspect Writing
1、To modify the template in the plugin, you can use injection (through injection, the original template file is not modified).
2、Scope of modified files: Except the following template files, they cannot be modified; other template files can be modified.
//html hook ignore dirs
'ignore_dirs' => [
'/themes/.*?/layout/',
'/themes/.*?/components/',
'/themes/.*?/errors/',
'/themes/.*?/design/',
'/resources/beike/admin/views/layouts/',
'/resources/beike/admin/views/components/',
'/resources/beike/admin/views/pages/login/',
'/resources/beike/admin/views/vendor/',
],
3、In the plugin, you can automatically generate Aspect files through the command line:
php artisan plugin:make-aspect <Name>
After the naming is executed, the Aspect file will be stored in: /plugin/Aspect/Html
4、Then develop the logic in the Aspect file. For related documents, please refer to: QueryList | Elegant progressive PHPDOM parsing framework (opens new window)
/**
* all parameters used when use the template All parameters
*/
$data = $arguments->data;
/**
* QueryList object ql object
* you can see https://querylist.cc/
*/
$ql = $arguments->ql;
5、The modified template files will be stored in: project/storage/aspect/html