A
Size: a a a
A
A
VP
AD
composer require laravel/legacy-factoriesВ bootstrap/app.php добавил:
$app->register(Illuminate\Database\Eloquent\LegacyFactoryServiceProvider::class);Есть сидер:
database/seeds/UsersTableSeederFake.phpВызываю
php artisan db:seed --class=UsersTableSeederFake;Но вываливается:
Target class [Database\Seeders\UsersTableSeederFake] does not exist.Делал.
composer dump-autoload;
А
А
composer require laravel/legacy-factoriesВ bootstrap/app.php добавил:
$app->register(Illuminate\Database\Eloquent\LegacyFactoryServiceProvider::class);Есть сидер:
database/seeds/UsersTableSeederFake.phpВызываю
php artisan db:seed --class=UsersTableSeederFake;Но вываливается:
Target class [Database\Seeders\UsersTableSeederFake] does not exist.Делал.
composer dump-autoload;
AD
A
А
AD
VP
А
MP
if (!function_exists('paginate_collection')) {
/**
* Paginate a collection of items.
*
* @param array|\Illuminate\Support\Collection $items
* @param int $perPage
* @param null $currentPage
* @param array $options
*
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
function paginate_collection($items, $perPage, $currentPage = null, array $options = [])
{
$currentPage = $currentPage ?: \Illuminate\Pagination\Paginator::resolveCurrentPage();
$currentPage = $currentPage ?: 1;
$items = $items instanceof \Illuminate\Support\Collection
? $items
: collect($items);
$slice = $items->forPage($currentPage, $perPage);
if (!isset($options['path'])) {
$options['path'] = \Illuminate\Pagination\Paginator::resolveCurrentPath();
}
$paginator = new \Illuminate\Pagination\LengthAwarePaginator(
$slice, count($items), $perPage, $currentPage, $options
);
return $paginator;
}
}П
АС
АС
АС
П