Background Image

Built-in Modules

A fresh LaraAdmin install has these modules. They are ordinary modules, so you can add fields to them in Module Manager and change their code in app/Http/Controllers/LA/ and resources/views/la/.

ModuleAdmin URLPurpose
Users/admin/usersLogin accounts (listing and details only)
Employees/admin/employeesStaff who use the admin panel
Customers/admin/customersCustomers, who can register and log in on the site
Departments/admin/departmentsGroups of roles
Roles/admin/rolesRoles, their hierarchy and module access
Permissions/admin/permissionsNamed permissions given to roles
Uploads/admin/uploadsMedia manager
Backups/admin/backupsDatabase and uploads backups
Blog Categories, Blog Posts/admin/blog_categories, /admin/blog_postsA small blog shown on the public site
LA Logs/admin/la_logsActivity log

The Super Admin also has Modules, Menus and Configure (/admin/la_configs) in the navbar.

A User is a login account. Every user belongs to either an Employee or a Customer record (the user's context_type), and has one or more roles.

  • Employees are added in the admin panel. Adding an employee creates their user with a random password and the roles you choose. The employee forms can't give the Super Admin role, and editing a Super Admin keeps it.
  • Customers register themselves at /customers/register, or are added in the admin panel. They get the CUSTOMER role and can't open the admin panel.
  • Login details are emailed to new users when MAIL_USERNAME is set. Otherwise the password is written to storage/logs/laravel.log.
  • An employee's password can be changed from their page by the employee themself or by the Super Admin.
  • The first user to register at /register becomes the Super Admin. After that, /register refuses employee registrations.
LaraAdmin Employee View

Roles belong to a department and form a hierarchy (Roles → Hierarchy). The seeder creates three roles:

RoleForAccess
SUPER_ADMINEmployeesEverything, including Module Manager, Menus, Configure and Backups
ADMINEmployeesThe admin panel (ADMIN_PANEL permission). Module access must be granted.
CUSTOMERCustomersNo admin panel

See Roles & Access Control for module, field and menu access.

The media manager, also used by Image, File and Files fields. See Uploads Manager.

Backups uses spatie/laravel-backup 10. Create Backup makes a zip of the database and storage/uploads. The application code and .env are left out. The settings are in config/backup.php.

  • The database dump needs mysqldump on the server.
  • Backups are stored on the disk configured in config/backup.php (the local disk, i.e. storage/app, by default). Copy them off the server, for example with a scheduled php artisan backup:run to an S3 disk.
  • Downloading a backup needs create access to Backups: a backup contains the whole database, including password hashes.
  • Failure notifications are mailed to MAIL_FROM_ADDRESS.
LaraAdmin Backups

Blog Categories and Blog Posts are managed in the admin panel and shown on the public site:

URLPage
/blogPublished posts
/blog/{post_url}A post. Draft posts return 404.
/category/{category_url}Posts of a category

The /blog prefix is blogRoute in config/laraadmin.php. A post has a title, URL, category, status (Draft / Published), author, tags, date, excerpt, banner image and HTML content.

LA Logs records who did what: users created, updated and deleted, logins and logouts, and the same for employees, customers, uploads, backups and every generated module. Open it at /admin/la_logs; each module's record page also shows its history.

Log types are declared in config/laraadmin.php under log. The CRUD generator adds *_CREATED, *_UPDATED and *_DELETED for each new module. To write your own entry, add a type to the config and call LALog::make():

use App\Models\LALog;

// config/laraadmin.php, under 'log' => 'Courses' => [...]
'COURSE_PUBLISHED' => ['name' => 'Course Published', 'is_notif' => 'false', 'code' => 'COURSE_PUBLISHED', 'module' => 'Courses'],

// in your code
LALog::make('Courses.COURSE_PUBLISHED', [
    'title' => 'Course Published',
    'module_id' => 'Courses',
    'context_id' => $course->id,
    'content' => $course,
    'user_id' => Auth::user()->id,
    'notify_to' => '[]',
]);

Entries with a type that isn't in the config are skipped.


What's Next ?