Download the PHP package tapp/filament-lms without Composer

On this page you can find all versions of the php package tapp/filament-lms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-lms

Filament LMS

An opinionated LMS plugin for Filament containing a user facing LMS panel and Resources for an existing admin panel

Version Compatibility

Filament Filament LMS Documentation
4.x/5.x 4.x Current
3.x 1.x Check the docs

Installation

Add the following to composer.json

or

Publish

Make sure that the Filament Form Builder migrations are published before.

Then publish the migrations:

[!WARNING]
If you are using multi-tenancy, please see the "Multi-Tenancy Support" section below before running migrations.

run migrations after publishing

Add plugin to admin panel

This will create resources that allow admin to manage course material.

Tailwind CSS Setup

This package uses Tailwind CSS classes in its Blade views. The configuration differs between Tailwind v3 and v4:

For Tailwind CSS v3

  1. Install Tailwind CSS in your project (if not already installed):

  2. Configure Tailwind to include the package's views in your tailwind.config.js:

  3. Include the package CSS in your main CSS file (e.g., resources/css/app.css):

  4. Build your CSS to include both Tailwind and the package styles:

For Tailwind CSS v4

  1. Install Tailwind CSS v4 in your project:

  2. Include the package CSS in your main CSS file (e.g., resources/css/app.css or resources/css/theme.css):

  3. Build your CSS to include both Tailwind and the package styles:

Note: The package provides its own CSS for component-specific styling, while using Tailwind classes in views for layout and utilities. This approach ensures no dependency conflicts while maintaining the benefits of Tailwind CSS.

For more detailed Tailwind CSS configuration options, refer to the official Tailwind CSS documentation.

Development Reccomendations

Multi-Tenancy Support

Filament LMS includes built-in support for multi-tenancy, allowing you to scope courses, lessons, steps, and all learning materials to specific tenants (e.g., teams, organizations, workspaces).

⚠️ Important: Enable Tenancy Before Migrations

You MUST configure and enable tenancy in the config file BEFORE running the migrations. The migrations check the tenancy configuration to determine whether to add tenant columns to the database tables. If you enable tenancy after running migrations, you'll need to manually add the tenant columns to your database.

Quick Setup

  1. Configure tenancy in config/filament-lms.php BEFORE running migrations:

  2. Run migrations (which will now include tenant columns):

  3. Implement required contracts on your User model:

  4. Implement HasName contract on your Tenant model:

How It Works

Once tenancy is enabled:

URL Structure Changes:

Data Scoping:

Permission Checking:

LMS Features

Frontend LMS Panel

contains the LMS experience for the end user

Course Library

Admin Plugin

(should these be resource groups in existing panel or its own panel?)

LMS resource group contains the following resources:

Course

Configurations

This is the contents of the published config file:

top_navigation

Set it to true to enable top navigation on the LMS dashboard (courses list page).

Note: This configuration only affects the dashboard. Course pages (when viewing individual steps) always use sidebar navigation, regardless of this setting.

show_exit_lms_link

Use to display or not the Exit LMS link on top bar.

Certificate Customization

The LMS package generates PDF certificates when users complete courses. You can customize the appearance and content of certificates using the following configuration options:

certificate_logo

Specify a custom logo to display on certificates. If not set, it falls back to the brand_logo setting.

Recommended logo dimensions: Maximum height of 90px for optimal certificate layout.

Note: The path should be relative to your public directory or use a full URL.

certificate_show_signatures

Control whether signature lines are displayed on certificates. Default is true.

When enabled, the certificate will display signature lines for:

certificate_show_id

Control whether a unique certificate ID is displayed on certificates. Default is true.

The certificate ID helps with verification and tracking of issued certificates.

Example Certificate Configuration

Here's a complete example of certificate customization in your config/filament-lms.php:

Adding extra navigation items

To register new navigation items in the LMS panel, use the boot() method of your AppPanelProvider.php file:

Authorization

Gates

The LMS package uses Laravel Gates for authorization. You'll need to define the following Gates in your application's AuthServiceProvider:

Available Gates

Course Authorization

Restricting Course Visibility

To restrict users to only see courses they are assigned to, set the following in your config/filament-lms.php:

When enabled, users will only see courses assigned to them via the lms_course_user pivot table.

User-Course Management in Filament

This package provides a reusable CoursesRelationManager and AssignCoursesBulkAction for managing user-course assignments. To enable course assignment in your User resource:

  1. Import the Relation Manager and Bulk Action:

  2. Register the CoursesRelationManager:

  3. Add the AssignCoursesBulkAction to your bulk actions:

Overriding Course Visibility

If you need custom logic to determine whether a course is visible to a user, you can override the isCourseVisibleForUser method provided by the FilamentLmsUser trait in your User model. This method is used to filter which courses are shown to the user when course visibility restrictions are enabled.

If you want to call the trait's original method within your override, you can alias it when importing the trait:

This allows you to implement any business rules you need for course visibility, while still leveraging the default logic from the trait if desired.

Step Access Control

Customizing Step Access

The LMS package provides a flexible way to control which steps users can access through the canAccessStep method. This method is available on any model that uses the FilamentLmsUser trait and can be overridden to implement custom access control logic.

Default Behavior

By default, the canAccessStep method checks if the step is available based on the completion of previous steps in the course. This ensures users must complete steps in the proper sequence.

Overriding Step Access Control

To implement custom step access logic, override the canAccessStep method in your User model:

Where Step Access is Enforced

The canAccessStep method is automatically used in the following places:

  1. Step Page Access: When users try to access a step directly via URL
  2. Navigation Links: Determines which step links are clickable in the course navigation
  3. Current Step Detection: Used when determining which step to redirect users to

Integration with Existing Logic

The canAccessStep method works alongside the existing getAvailableAttribute() method in the Step model. While getAvailableAttribute() handles the basic sequential completion logic, canAccessStep provides an additional layer of access control that can be customized per user.

Customizing Step Edit Permissions

The LMS package also provides a way to control which users can edit steps through the canEditStep method. This method is separate from canAccessStep and specifically controls edit permissions.

Default Behavior

By default, the canEditStep method returns false, meaning no users have edit permissions. This ensures that step editing is disabled by default and must be explicitly enabled.

Overriding Step Edit Permissions

To implement custom step edit logic, override the canEditStep method in your User model:

Where Step Edit Permissions are Used

The canEditStep method is used in the following places:

  1. Edit Button Visibility: Controls whether the "Edit" button appears on step pages
  2. Admin Interface: Can be used to control access to step editing in the Filament admin panel
  3. API Endpoints: Can be used to secure step editing API endpoints

Separation of Concerns

Note that canEditStep is separate from canAccessStep:

This separation allows for fine-grained control over user permissions, where users might be able to view steps but not edit them.


All versions of filament-lms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^5.0|^4.0
filament/spatie-laravel-media-library-plugin Version ^5.0|^4.0
illuminate/contracts Version ^13.0||^12.0
maatwebsite/excel Version ^4.0
spatie/browsershot Version ^5.0
spatie/eloquent-sortable Version ^5.0
tapp/filament-form-builder Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tapp/filament-lms contains the following files

Loading the files please wait ...