Trouble shoothing

Table not found

If you have pivot type models in your codebase, you will most likely need to specify $table in your pivot model. Otherwise, Eloquentize will try to count the user_widgets table by convention.

class UserWidget extends Model { /** * The table associated with the model. * * @var string */ protected $table = 'user_widget'; }

Command not found

If you get an old version laravel ( before 9 ) you might need to register commands in kernel.php

class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ DeleteExpiredBookingInShoppingCart::class, FixOldAccessCode::class, MakeAddictExpire::class, MakeAddictExtends::class, DeleteUnusedInvitation::class, // Add the eloquentize command you need here ModelsCount::class, PropertyAggregate::class, ModelsCountLegacy::class ];

About the author

© Eloquentize 2024