{"id":15016848,"url":"https://github.com/jcergolj/laravellte","last_synced_at":"2025-04-09T18:21:38.393Z","repository":{"id":37588944,"uuid":"233658991","full_name":"jcergolj/laravellte","owner":"jcergolj","description":"Fully customizable and tests supported Laravel admin dashboard 2.0","archived":false,"fork":false,"pushed_at":"2023-02-02T01:11:15.000Z","size":3255,"stargazers_count":218,"open_issues_count":17,"forks_count":37,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T20:38:04.040Z","etag":null,"topics":["admin-dashboard","adminlte","alpinejs","authorisation","files-scaffolding","laravel","livewire","livewire-components"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcergolj.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-13T17:58:53.000Z","updated_at":"2025-03-19T16:59:07.000Z","dependencies_parsed_at":"2023-02-17T13:01:37.737Z","dependency_job_id":null,"html_url":"https://github.com/jcergolj/laravellte","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcergolj%2Flaravellte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcergolj%2Flaravellte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcergolj%2Flaravellte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcergolj%2Flaravellte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcergolj","download_url":"https://codeload.github.com/jcergolj/laravellte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085583,"owners_count":21045181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-dashboard","adminlte","alpinejs","authorisation","files-scaffolding","laravel","livewire","livewire-components"],"created_at":"2024-09-24T19:49:28.382Z","updated_at":"2025-04-09T18:21:38.364Z","avatar_url":"https://github.com/jcergolj.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fully customizable and tests supported Laravel admin dashboard 2.0\n\n## Intro\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/jcergolj/laravellte-docs/blob/master/login.png\" width=\"250px\"\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/jcergolj/laravellte-docs/blob/master/users.png\" width=\"250px\"\u003e\n\u003c/td\u003e\n\u003ctd style=\"margin-left:20px\"\u003e\n\u003cimg src=\"https://github.com/jcergolj/laravellte-docs/blob/master/profile.png\" width=\"250px\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nThis is a boilerplate for opinionated Laravel 8.0 admin panel build with AdminLTE 3.0 theme, Alpinejs 2.0, Livewire 2.0, supported with tests and optional feature branches.\n\u003cbr/\u003e\n\u003cbr/\u003e\n**You can check this repo I am actively working on [Laravel Castra](https://github.com/jcergolj/castra). Same idea, different tools (Hotwire Turbo).**\n\n## Contents\n- [Have total control of the code](#have-total-control-of-the-code)\n- [Summary](#summary)\n- [Feature Branches](#feature-branches)\n- [Installation](#installation)\n- [Care for the code](#care-for-the-code)\n- [Files scaffolding](#files-scaffolding)\n- [Authorisation](#authorisation)\n- [Licence](#licence)\n- [Contributors](#contributors)\n\n## Have total control of the code\nSometimes packages are to **too big or too cumbersome** to use. Other times package **doesn't have a critical feature** that you are looking for and you are doing some hacks to get around it.\n\nWhat you are missing is having control over the code, and now you have it!\nDon't like how a new user is added. No problem. You can amend the code however you like. No more forking packages and messing with their code.\n**The idea is to create branches of standard features and make them available for others to merge them into their master branch.**\n\n## Summary\n* Laravel 8.0, Alpinejs, Livewire 2.0, AdminLTE theme 3.0 :heavy_check_mark:\n* Login :heavy_check_mark:\n* Forgot Password :heavy_check_mark:\n* CRUD for Users :heavy_check_mark:\n* Welcome email for a new user with a link for setting up a new password :heavy_check_mark:\n* CRUD for roles (basic auth system) :heavy_check_mark:\n* Option to assign route based permissions to role :heavy_check_mark:\n* Profile with change password, email and user's image option :heavy_check_mark:\n* Confirmation email to confirm a new user's email :heavy_check_mark:\n* File scaffolding :heavy_check_mark:\n* CI included (github actions) :heavy_check_mark:\n* Over 200 tests included :heavy_check_mark:\n\n## Feature Branches\nHere is the list of supported feature branches. By merging them into master you unlock new features.\n1. [User Registration](https://github.com/jcergolj/laravellte/tree/feature/registration)\n2. [Simple Role Based Authorisation](https://github.com/jcergolj/laravellte/tree/feature/simple-role-based-auth)\n\n## Installation\nAfter installing \u003ca href=\"https://laravel.com/docs/8.0/\"\u003eLaravel\u003c/a\u003e you should run those commands:\n```\ngit clone https://github.com/jcergolj/laravellte.git\ncomposer install\ncp .env.example .env\nphp artisan key:generate\nnpm install\nnpm run dev\ncomposer cghooks update\nphp artisan migrate:fresh --seed\n```\n\n## Care for the code\nLet's face it. Sometimes we are sloppy, and we don't take the best care of the code. I added some useful packages (isn't it ironic) to take as much burden off developer as possible.\n\n- Before you commit, the code is auto-styled according to Laravel standards using [matt-allan/laravel-code-style package](https://github.com/matt-allan/laravel-code-style).\n- Next [nunomaduro/phpinsights](https://github.com/nunomaduro/phpinsights) package inspects the code and alerts if code is not in the best shape.\n```\n\"php artisan insights --no-interaction --min-quality=90 --min-complexity=85 --min-architecture=90 --min-style=95\"\n```\n- Are tests still slow? [johnkary/phpunit-speedtrap](https://github.com/johnkary/phpunit-speedtrap) package finds the slow tests for you.\n- Lastly [brainmaestro/composer-git-hooks](https://github.com/BrainMaestro/composer-git-hooks) package is utilized so everything is done automatically.\n\u003ca href=\"https://github.com/jcergolj/laravellte/blob/master/composer.json#L45\"\u003eSee how\u003c/a\u003e\n\n## Files Scaffolding\nFor CRUD actions you might consider using built-in files scaffolding command. It generates files for Index, Create, Show, Edit and Delete actions like this:\n```\nphp artisan make:ltd-component bla --index --create --show --edit --delete\n```\nYou can omit any of the options. If you wish you can update the `stubs` files as you like.\nThere are comments in scaffolded files acting as a reminder for you to amend the code. You can find then by typing: `index-review`, `create-review`, `show-review`, `edit-review`, `delete-review`. Factory and Model scaffolding aren't included in this command.\n\n## Authorisation\nLaravellte uses role - permissions based authorisation system. Only users with Admin role can add new roles and assign permissions to it.\n\n### About permissions\nFor new resources permissions are added through [PermissionsTableSeeder](https://github.com/jcergolj/laravellte/blob/master/database/seeds/PermissionsTableSeeder.php). By convention the main permissions type are *index*, *create*, *edit*, *show*, and *delete* with resource in plural prefix. Example: *users.index*. Having said that, you are free to add your own. However you'll have to review/amend the code.\n\u003cbr/\u003e\nBased on convention route names must be on of those types: *index*, *create*, *edit*, *show*, and *delete*.\n[See example](https://github.com/jcergolj/laravellte/blob/master/routes/web.php#L49).\n\u003cbr/\u003e\nFor livewire components the convention for naming them is as follows: you have to use one those types follow by resource name and then Component. e.g. [IndexUserComponent](https://github.com/jcergolj/laravellte/blob/master/app/Http/Livewire/IndexUserComponent.php)\nAll Livewire components must use [HasLivewireAuth](https://github.com/jcergolj/laravellte/blob/master/app/Http/Livewire/IndexUserComponent.php#L11) trait. Here is [implementation](https://github.com/jcergolj/laravellte/blob/master/app/Http/Livewire/HasLivewireAuth.php).\n\n### Owner restricted for index pages\nWhen adding permission to the role, there is an extra filed called *owner_restricted*.\nIf *owner restricted* field is **true** for any index page user with that permission can only see its own resources. However, in order this to work, resource must have [owner_id filed](https://github.com/jcergolj/laravellte/blob/master/app/Providers/AppServiceProvider.php#L14) and *VisibleTo* global attached in [boot method](https://github.com/jcergolj/laravellte/blob/master/app/Models/User.php#L46).\n\n### Owner restricted for show, edit, delete actions\nIf *owner restricted* field is **true** for *show*, *edit* and *delete* types, user can only amend resources that he owns.\n\n### Owner restricted for create\nFor create types *owner restricted* is ignored.\n\n### For Route Gate\nIn the core of it is [ForRouteGate](https://github.com/jcergolj/laravellte/blob/master/app/Services/ForRouteGate.php) that handles authorisation. The honourable mention goes to [Authorisation Middleware](https://github.com/jcergolj/laravellte/blob/master/app/Http/Middleware/Authorisation.php).\n\n### Authorisation cookbook\n1. Apply permissions to the role.\n2. Make sure that **Authorisation** middleware is applied to resource's routes [Example](https://github.com/jcergolj/laravellte/blob/master/routes/web.php#L48)\n3. Make sure routes and permissions are named **resources.index** (according to convention) [Example](https://github.com/jcergolj/laravellte/blob/master/routes/web.php#L49)\n4. Make sure **VisibleTo** global scope is applied to models [Example](https://github.com/jcergolj/laravellte/blob/master/app/Models/User.php#L51)\n5. Make sure **HasLivewireAuth** trait is applied to all Livewire Components [Example](https://github.com/jcergolj/laravellte/blob/master/app/Http/Livewire/CreateUserComponent.php#L16)\n\n### Warning\n**For Admin Role permissions restriction do not apply.**\n\n## License\nLicensed under the [MIT license](https://github.com/deployphp/deployer/blob/master/LICENSE)\n\n## Contributors\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/jcergolj\"\u003e\n\u003cimg src=\"https://avatars0.githubusercontent.com/u/6940394?s=460\u0026amp;u=b4eaa035a3526a442d7d09dbf4d9d3ca63bfc1a5\u0026amp;v=4\" width=\"100px\"\u003e\n\u003cbr /\u003e\n\u003csub\u003e\n\u003cb\u003eJanez Cergolj\u003c/b\u003e\n\u003c/sub\u003e\n\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/horaciod\"\u003e\n\u003cimg src=\"https://avatars3.githubusercontent.com/u/1373814?s=400\u0026u=eee905c70aa654bd5ee2aba896e531ab6b7949d4\u0026v=4\" width=\"100px\"\u003e\n\u003cbr /\u003e\n\u003csub\u003e\n\u003cb\u003eHoracio Degiorgi\u003c/b\u003e\n\u003c/sub\u003e\n\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/ChrisThompsonTLDR\"\u003e\n\u003cimg src=\"https://avatars0.githubusercontent.com/u/348801?s=400\u0026u=c87a0ad57588c43838f95899e6dcd1ef678e5793\u0026v=4\" width=\"100px\"\u003e\n\u003cbr /\u003e\n\u003csub\u003e\n\u003cb\u003eChris Thompson\u003c/b\u003e\n\u003c/sub\u003e\n\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/madurapa\"\u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/4289578?v=4\" width=\"100px\"\u003e\n\u003cbr /\u003e\n\u003csub\u003e\n\u003cb\u003eMaduka Jayalath\u003c/b\u003e\n\u003c/sub\u003e\n\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcergolj%2Flaravellte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcergolj%2Flaravellte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcergolj%2Flaravellte/lists"}