The magic of creating an Administrator page.
Version | Laravel |
---|---|
v1.0.x | 7.x |
v1.8.* | 8.x |
v2.0.* | 9.x |
Schema for apps that have a login page for members. You can use laravel/breeze, larave/ui, laravel jetstream, etc.
Now Ladmin comes of implementing Modular's concept where each module was made separately to manage your application easily. Click here for more details.
$ php artisan module:make-menu PostMenu --module=Blog
Follow the steps below to get started faster! Add the repository by running the command below.
$ composer require hexters/ladmin
Use \Hexters\Ladmin\LadminAccount
into model \App\Modules\User
see the example.
. . .
use Hexters\Ladmin\LadminAccount;
class User extends Authenticatable {
use HasApiTokens, HasFactory, Notifiable, LadminAccount;
. . .
Open file \Database\Seeders\DatabaseSeeder
, add the code below or you can create your own seeder file.
\App\Models\User::factory(10)->create();
Install ladmin component and assets.
$ php artisan ladmin:install
Run migrate and seed, to install ladmin database tables
$ php artisan migrate --seed
And run seeder ladmin module, to assign role and permission to existing user.
$ php artisan module:seed Ladmin
Installation is complete, please access http://localhost:8000/administrator
To call view
, language
, config
, and component
file, you need to add the prefix of module's name eg blog
, see example below.
Calling View:
view('blog::article.index');
Calling Lang:
__('blog::error.auth.message');
trans('blog::error.auth.message');
Lang::get('blog::error.auth.message');
Calling Config:
config('blog.name')
For component view, if you have component named \Modules\Blog\View\Components\Input
class, then the way to call it by running.
<x-blog-input />
<x-ladmin-guest-layout>
<x-slot name="metaTitle">Meta Page Title</x-slot>
@push('before-style')
<!-- ... -->
@endpush
<x-slot name="styles">
<!-- <link href="custom.css" rel="stylesheet" /> -->
</x-slot>
@push('after-style')
<!-- ... -->
@endpush
<!-- Content here -->
@push('before-script')
<!-- ... -->
@endpush
<x-slot name="scripts">
<!-- <script src="custom.js" ></script> -->
</x-slot>
@push('after-script')
<!-- ... -->
@endpush
</x-ladmin-guest-layout>
<x-ladmin-auth-layout>
<x-slot name="title">Page Title</x-slot>
<!-- Follow guest layout for slots & stacks -->
</x-ladmin-auth-layout>
View complete documentation