Download the PHP package particle-academy/laravel-courses without Composer

On this page you can find all versions of the php package particle-academy/laravel-courses. 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 laravel-courses

particle-academy/laravel-courses

Laravel package for selling and serving educational curriculums, courses, tests, and certificates. API-only — bring your own UI (or use the @particle-academy/classroom React kit built for it).

Install

The package's CoursesServiceProvider auto-discovers; migrations and routes load automatically.

Publish what you want to override:

Configure

config/laravel-courses.php:

Domain

Slugs

Curriculum, Course, Test, CertificateTemplate, Module and Lesson fill in their own slug when you do not supply one — derived from the title, with a -2, -3 suffix on collision. modules and lessons are unique per course; the rest are unique globally.

Pass a slug explicitly to override. Create-only — an existing slug is never rewritten when a title changes, because a published URL that silently moves is worse than an out-of-date one.

Endpoints

All routes mount under the configured prefix (default /api/courses).

Authoring (CRUD)

Method Path Notes
GET / POST / GET-:slug / PATCH-:slug / DELETE-:slug curriculums slug-bound
POST curriculums/{slug}/courses attach a course (sort_order, is_required)
DELETE curriculums/{slug}/courses/{slug} detach
* courses slug-bound; also accepts price, currency, highlights, is_required, hours
* courses/{slug}/modules, courses/{slug}/lessons nested
* tests, tests/{slug}/questions, questions/{id}/options nested
* certificate-templates one row should be is_default: true

Learner flow

Method Path Notes
GET enrollments current learner's enrollments
POST enrollments enroll: target_kind, target_slug/target_id, optional metadata
GET enrollments/{id} includes progress summary
DELETE enrollments/{id} drops the enrollment
POST enrollments/{id}/lessons/{lesson}/complete marks lesson done
POST enrollments/{id}/tests/{test}/attempts starts an attempt
GET attempts/{id} full attempt with answers
POST attempts/{id}/submit grades and finalizes
POST enrollments/{id}/certificate issues once enrollment is fully complete
GET certificates/{id} learner's own certificate
GET certificates/{id}/pdf downloads the rendered PDF

Admin / public

Method Path Notes
POST admin/completions short-circuit: enroll + complete + issue cert in one call (user_id, target_kind, target_slug/target_id, issued_by_user_id, notes, completed_at, expires_at)
POST certificates/{id}/revoke revoke with optional reason
GET verify/{code} public verify by verification_code OR certificate_number. Returns valid: false if revoked.

Learner resolution

LearnerResolver resolves the learner id for any request, in this order:

  1. $request->user() (set by the host's auth middleware) — preferred.
  2. user_id in the request body or X-Learner-Id header — useful for server-to-server callers or tests. Disable with config('laravel-courses.allow_input_user_id', false).

Events

Listen from your host app to wire audit logs, broadcasts, notifications:

Certificate templates

Certificate PDFs are written by particle-academy/fine-print (pure PHP, no active content) from a JSON document, not from HTML. A design is a fancy-template envelope: a fine-print document with {{ tokens }}, plus the variables it declares.

CertificateService::document() returns the fine-print JSON before it is written, for previews or tests.

Deprecated: HTML templates

renderHtml(), the html / css / blade_view columns, default_view, template_attributes and the laravel-courses-views publish tag still work for one minor, for HTML previews only. They no longer affect the PDF: a template with no document gets the default certificate, and a warning is logged. They are removed in the next minor.

Classroom React UX

The companion React kit is @particle-academy/classroom on npm — built on @particle-academy/react-fancy, talks to this API.

Components:

The CoursesClient (axios) covers the learner flow. Pass learnerId in its options to send X-Learner-Id.

Tests

The suite runs standalone on Orchestra Testbench:

The shipped tests cover the full learner flow (enroll → complete lesson → pass test → issue certificate → public verify) and the revocation cycle. Factories for every model live under database/factories/.

For a quick interactive smoke, from a Laravel app that has the package installed:


All versions of laravel-courses with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/http Version ^13.0
illuminate/routing Version ^13.0
illuminate/support Version ^13.0
illuminate/validation Version ^13.0
particle-academy/fine-print Version >=0.3.0 <2.0
particle-academy/fancy-template Version >=0.3.0 <2.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 particle-academy/laravel-courses contains the following files

Loading the files please wait ...