mercredi 24 février 2021

Laravel Return Migration and Eloquent Response

Is there any way to get the response or message from the migration and eloquent? Regardless of success or failure.

Migration:

$response = Artisan::call('make:model', [
    'name' => 'MyModel'
    '-m' => true
]);
//I need the response for my next step

Eloquent:

$response = MyModel::create($myValues);
//I need the response for my next step


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire