Back to School: coupon SCHOOL25 for 40% off Yearly/Lifetime membership! Read more here

LMS: Learning Management System

Filament 4

A simple learning management system for managing courses and lessons.

Ior2jdSnC3yXfO73Sq6jf5CDXldC7c-metaU2NyZWVuc2hvdCAyMDIzLTEwLTE5IGF0IDEwLjM4LjMwLnBuZw==-

Get the Source Code:

How it works

The project has three main parts:

  • Filament Admin Panel
    • Courses
    • Lessons are managed inside the course as a nested resource
    • Course has a featured image using Spatie Media Library
    • Course description has a rich text editor
    • Lesson lesson_text has a rich text editor
    • Ability to reorder lessons in the lesson list
    • Course and Lessons can be published/unpublished
  • Filament Student Panel
    • Students can browse courses and lessons
    • Lesson can be marked/unmarked as completed
    • When the student navigates to the next lesson, the current lesson is automatically marked as completed
    • Students can see their courses in progress on the My Courses page
  • Public page
    • Lists published courses and lessons.
    • To view the lesson, the user must register/login
    • After registration/login, students are redirected to the lesson page if they tried to view it before.

Course resource has nested resource to manage lessons and has routes for lesson pages.

app/Filament/Admin/Resources/Courses/CourseResource.php:

use App\Models\Course;
use Filament\Tables\Table;
use Filament\Schemas\Schema;
use Filament\Resources\Resource;
use Filament\Support\Icons\Heroicon;
use App\Filament\Admin\Resources\Courses\Pages\EditCourse;
use App\Filament\Admin\Resources\Courses\Pages\ListCourses;
use App\Filament\Admin\Resources\Courses\Pages\CreateCourse;
use App\Filament\Admin\Resources\Courses\Schemas\CourseForm;
use App\Filament\Admin\Resources\Courses\Tables\CoursesTable;
use App\Filament\Admin\Resources\Courses\Pages\ManageCourseLessons;
 
class CourseResource extends Resource
{
protected static ?string $model = Course::class;
 
protected static string | \BackedEnum | null $navigationIcon = Heroicon::OutlinedRectangleStack;
 
public static function form(Schema $schema): Schema
{
return CourseForm::configure($schema);
}
 
public static function table(Table $table): Table
{
return CoursesTable::configure($table);
}
 
public static function getRelations(): array
{
return [
//
];
}
 
public static function getPages(): array
{
return [
'index' => ListCourses::route('/'),
'create' => CreateCourse::route('/create'),
'edit' => EditCourse::route('/{record}/edit'),
'lessons' => ManageCourseLessons::route('/{record}/lessons'),
];
}
}

Here's a resource to display the My Courses table.

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 148 Premium Examples for $99