## Change Command Snippets --- ### Alternate Snippets for View Files ### `[ProjectRoot]/app/Views/**.php`
Command Description Output
Lates News
ci4_endsection ci4:views:endSection Make end Section ```php endSection() ;?> ```
ci4_extend ci4:views:extend Using Layouts in Views ```php extend('layouts') ;?> ```
ci4_include ci4:views:include Including View Partials ```php include('sidebar') ;?> ```
ci4_php ci4:views:php Make php tag ```php ```
ci4_php_echo ci4:views:php-echo Make php echo tag ```php ```
ci4_rendersection ci4:views:renderSection Make render Section ```php renderSection('content') ;?> ```
ci4_section ci4:views:section Make Section ```php section('content') ;?> ```
ci4_sectionend ci4:views:section-endSection Make Section with end Section ```php section('content') ;?> endSection() ;?> ```
--- ### Alternate Snippets for Routes ### `[ProjectRoot]/app/Config/Routes.php`
Command Description Output
Lates News
ci4_routes_add ci4:routes:add Make Routes add() ```php $routes->add('url', 'ControllerName::index'); ```
ci4_routes_cli ci4:routes:cli Make Command-Line only Routes ```php $routes->cli('migrate', 'App\Database::migrate'); ```
ci4_routes_env ci4:routes:env Make Routes Environment ```php $routes->environment('development' , function($routes) { $routes->add('builder','Tools\Builder::index'); }); ```
ci4_routes_get ci4:routes:get Make Routes get() ```php $routes->get('url', 'ControllerName::index'); ```
ci4_routes_group ci4:routes:group Make Routes group() ```php $routes->group('admin', function($routes) { //Route }); ```
ci4_routes_group_filter ci4:routes:group-filter Make Routes group() filter ```php $routes->group('api' , ['filter' => 'api-auth'], function($routes) { $routes->resource('url'); }); ```
ci4_routes_group_multiple ci4:routes:group-multiple Make Routes group() multiple ```php $routes->group('admin', function($routes) { $routes->group('users', function($routes) { //Route }); }); ```
ci4_routes_group_namespace ci4:routes:group-namespace Make Routes group() namespace ```php $routes->group('api' , ['namespace' => 'App\API\v1'], function($routes) { //Route }); ```
ci4_routes_post ci4:routes:post Make Routes post() ```php $routes->post('url', 'ControllerName::index'); ```
ci4_routes_subdomain ci4:routes:subdomain Make Routes Limit to Subdomains ```php $routes->add('from', 'to', ['subdomain' => '*']); ```