🎉 Hello world

This commit is contained in:
2020-07-23 12:26:10 +02:00
commit 2de65bb4aa
113 changed files with 69672 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands;
use App\Parser;
use Illuminate\Console\Command;
class ParseLinkCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'parse:link {url}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Parse given link';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$parser = Parser::factory($this->argument('url'));
$home = $parser->parse();
var_dump($home);
return 0;
}
}

41
app/Console/Kernel.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}