jeudi 12 septembre 2019

How to display a message in console using a seeder class in Laravel 5.8?

To display an error while using Laravel Artisan the official Laravel 5.8 documentation says:

$this->error('Something went wrong!');

But what's the context of $this?

Following is the contents of the seeder class file:

use Illuminate\Database\Seeder;

class PopulateMyTable extends Seeder
{
    public function run()
    {
        $this->info("Console should show this message");
    }
}



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/34IppF6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire