Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

after migrating my code to Laravel 10, I had errors

after migrating to 10 i have error

after migrating to 10 i have error

ErrorException: Undefined property: YourModel::$dates
Error: Call to undefined method App\Jobs\YourJob::dispatchNow()
BadMethodCallException: Call to undefined method Illuminate\Routing\Route::home()

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

For This Error: ErrorException: Undefined property: YourModel::$dates

protected $dates = ['created_at', 'updated_at'];
in the model is deprecated change to

protected $casts = [ 'created_at' => 'datetime', ....];

For This Error: BadMethodCallException: Call to undefined method Illuminate\Routing\Route::home()

Route::home method has been deprecated use Route::get('/', '');

For This Error: Call to undefined method App\Jobs\YourJob::dispatchNow()

$job->dispatchNow(); is now $job->dispatchSync();

Do Kindly upgrade document for Laravel click here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading