search

Home  >  Q&A  >  body text

What do console.php and channels.php in the routes folder of laravel5.4 do?

What do console.php and channels.php in the routes folder of laravel5.4 do?

我想大声告诉你我想大声告诉你2753 days ago550

reply all(1)I'll reply

  • 迷茫

    迷茫2017-05-16 16:49:38

    console.php is used to define Artisan commands in the form of closures, such as

    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.

    channels.php用于定义Laravel的Event Broadcasting Function authorization rules for channels, please see: Event Broadcasting

    reply
    0
  • Cancelreply