1. Go to this page and download the library: Download dandysi/laravel-monorepo 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/ */
dandysi / laravel-monorepo example snippets
use Illuminate\Support\Facades\Route;
protected function configureRoutes()
{
Route::middleware('api')
->prefix('api')
->group(__DIR__ . '/routes.php')
;
}
use Chores\Console\ExpireArticlesCommand;
protected function registerCommands(): array
{
return [
ExpireArticlesCommand::class
];
}
use Illuminate\Console\Scheduling\Schedule;
protected function registerSchedule(Schedule $schedule): void
{
$schedule->command(ExpireArticlesCommand::class)->daily();
}