PHP code example of janole / laravel-composer-package
1. Go to this page and download the library: Download janole/laravel-composer-package 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/ */
janole / laravel-composer-package example snippets
class PackageServiceProvider extends ServiceProvider
{
...
public function boot()
{
// Register an artisan command ... (php artisan demo:command)
$this->commands([\janole\Demo\Console\Commands\DemoCommand::class]);
// Register some demo routes
$this->loadRoutesFrom(__DIR__.'/../routes/routes.php');
// Register some demo views
// (use them with the corresponding prefix like: @
$this->loadViewsFrom(__DIR__.'/../resources/views', 'prefix');