What do console.php and channels.php in the routes folder of laravel5.4 do?
console.php is used to define Artisan commands in the form of closures, such as
console.php
Artisan::command('build {project}', function ($project) { $this->info("Building {$project}!"); });
The above command can be created directly in console.php, and the content in the file will be automatically loaded in the app/Console/Kernel.php file.
app/Console/Kernel.php
channels.php用于定义Laravel的Event Broadcasting Function authorization rules for channels, please see: Event Broadcasting
channels.php
Event Broadcasting
console.php
is used to define Artisan commands in the form of closures, such asThe above command can be created directly in console.php, and the content in the file will be automatically loaded in the
app/Console/Kernel.php
file.channels.php
用于定义Laravel的Event Broadcasting
Function authorization rules for channels, please see: Event Broadcasting