Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get a list of all models Laravel

// oneliner
dd(collect(glob(app_path('Models') . '/*.php'))->map(fn ($file) => basename($file, '.php'))->toArray());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #models #Laravel
ADD COMMENT
Topic
Name
6+1 =