✅ CourseController (resource) ✅ CoursePolicy ✅ Маршруты: /admin/courses ✅ Blade-шаблоны: - index.blade.php (список с карточками) - create.blade.php (форма создания) - edit.blade.php (форма редактирования) - show.blade.php (просмотр) ✅ Ссылка в сайдбаре ✅ Загрузка изображений (thumbnail) ✅ Типы курсов: standard, scorm, h5p Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
38 lines
957 B
PHP
Executable File
38 lines
957 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\CourseCategory;
|
|
use App\Models\Group;
|
|
use App\Models\Organization;
|
|
use App\Models\User;
|
|
use App\Policies\CourseCategoryPolicy;
|
|
use App\Policies\GroupPolicy;
|
|
use App\Policies\OrganizationPolicy;
|
|
use App\Policies\UserPolicy;
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The model to policy mappings for the application.
|
|
*
|
|
* @var array<class-string, class-string>
|
|
*/
|
|
protected $policies = [
|
|
CourseCategory::class => CourseCategoryPolicy::class,
|
|
Course::class => CoursePolicy::class,
|
|
Organization::class => OrganizationPolicy::class,
|
|
Group::class => GroupPolicy::class,
|
|
User::class => UserPolicy::class,
|
|
];
|
|
|
|
/**
|
|
* Register any authentication / authorization services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
}
|