1. Go to this page and download the library: Download fredtux/artisan-view library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fredtux / artisan-view example snippets
public function register()
{
if ($this->app->environment() !== 'production') {
$this->app->register(\fredtux\ArtisanView\ServiceProvider::class);
}
}
bash
# Create a view 'index.blade.php' in the default directory
$ php artisan make:view index
# Create a view 'index.blade.php' in a subdirectory ('pages')
$ php artisan make:view pages.index
# Create a view with a different file extension ('index.html')
$ php artisan make:view index --extension=html
bash
# Create a resource called 'products' with generated views using bootstrap ui extending layout.php
$ php artisan make:view products --resource --generate product --ui bootstrap --extends layout.php
# Create and generate edit and index views based on Product model using bootstrap ui extending layout.php
$ php artisan make:view products --verb=edit --verb=index --generate product --ui bootstrap --extends layout.php
bash
# Remove the view 'index.blade.php'
$ php artisan scrap:view index
# Remove the view by dot notation
$ php artisan scrap:view pages.index
bash
# Don't ask for confirmation
$ php artisan scrap:view index --force
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.