├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Console │ ├── Commands │ │ └── CreateRoutePermissionsCommand.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── PermissionsController.php │ │ ├── ProfileController.php │ │ ├── RolesController.php │ │ └── UsersController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PermissionMiddleware.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── ProfileUpdateRequest.php │ │ ├── RegisterRequest.php │ │ └── StoreUserRequest.php ├── Models │ ├── Admin.php │ ├── Presenters │ │ └── UserPresenter.php │ ├── Traits │ │ └── HasHashedMediaTrait.php │ ├── User.php │ └── Userprofile.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── debugbar.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── media-library.php ├── permission.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ └── 2023_02_17_034249_create_permission_tables.php └── seeders │ ├── DatabaseSeeder.php │ └── UserSeeder.php ├── docker-compose.yml ├── docker ├── my.cnf └── php.ini ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── icons │ ├── brand.svg │ └── coreui.svg ├── img │ └── default-avatar.jpg ├── index.php ├── js │ ├── coreui.bundle.min.js │ └── jquery.min.js └── robots.txt ├── resources ├── js │ ├── app.js │ └── bootstrap.js ├── sass │ ├── _custom.scss │ ├── _layout.scss │ ├── _variables.scss │ ├── app.scss │ └── coreui │ │ ├── _custom.scss │ │ ├── _layout.scss │ │ ├── _variables.scss │ │ ├── examples.scss │ │ ├── style.scss │ │ └── vendors │ │ └── simplebar.scss └── views │ ├── about.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── profile.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── dashboard.blade.php │ ├── home.blade.php │ ├── layouts │ ├── app.blade.php │ ├── guest.blade.php │ ├── includes │ │ ├── errors.blade.php │ │ ├── footer.blade.php │ │ ├── header.blade.php │ │ ├── messages.blade.php │ │ └── show.blade.php │ └── navigation.blade.php │ ├── permissions │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── roles │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── settings │ ├── fields │ │ ├── checkbox.blade.php │ │ ├── email.blade.php │ │ ├── number.blade.php │ │ ├── select.blade.php │ │ ├── text.blade.php │ │ └── textarea.blade.php │ └── index.blade.php │ ├── users │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | APP_PORT=80 12 | FORWARD_DB_PORT=3306 13 | WWWGROUP=1000 14 | WWWUSER=1000 15 | 16 | DB_CONNECTION=mysql 17 | DB_HOST=127.0.0.1 18 | DB_PORT=3306 19 | DB_DATABASE=laravel 20 | DB_USERNAME=root 21 | DB_PASSWORD=root123 22 | 23 | BROADCAST_DRIVER=log 24 | CACHE_DRIVER=file 25 | FILESYSTEM_DISK=local 26 | QUEUE_CONNECTION=sync 27 | SESSION_DRIVER=file 28 | SESSION_LIFETIME=120 29 | 30 | MEMCACHED_HOST=127.0.0.1 31 | 32 | REDIS_HOST=127.0.0.1 33 | REDIS_PASSWORD=null 34 | REDIS_PORT=6379 35 | 36 | MAIL_MAILER=smtp 37 | MAIL_HOST=mailpit 38 | MAIL_PORT=1025 39 | MAIL_USERNAME=null 40 | MAIL_PASSWORD=null 41 | MAIL_ENCRYPTION=null 42 | MAIL_FROM_ADDRESS="hello@example.com" 43 | MAIL_FROM_NAME="${APP_NAME}" 44 | 45 | AWS_ACCESS_KEY_ID= 46 | AWS_SECRET_ACCESS_KEY= 47 | AWS_DEFAULT_REGION=us-east-1 48 | AWS_BUCKET= 49 | AWS_USE_PATH_STYLE_ENDPOINT=false 50 | 51 | PUSHER_APP_ID= 52 | PUSHER_APP_KEY= 53 | PUSHER_APP_SECRET= 54 | PUSHER_HOST= 55 | PUSHER_PORT=443 56 | PUSHER_SCHEME=https 57 | PUSHER_APP_CLUSTER=mt1 58 | 59 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 60 | VITE_PUSHER_HOST="${PUSHER_HOST}" 61 | VITE_PUSHER_PORT="${PUSHER_PORT}" 62 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 63 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 64 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/build 4 | /public/hot 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | .env 9 | .env.backup 10 | .env.production 11 | Homestead.json 12 | Homestead.yaml 13 | auth.json 14 | npm-debug.log 15 | yarn-error.log 16 | /.fleet 17 | /.idea 18 | /.vscode 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | ## Laravel 11.x ready to start project 5 | 6 | You may save your time to setup your project. You can start your project using this template where we have used Laravel 11.x and CoreUI out of the box Bootstrap. 7 | 8 | ## Laravel 11 9 | As you may know, Laravel transitioned to yearly releases with the release of Laravel 10. Previously, major versions were released every 6 months. This transition is intended to ease the maintenance burden on the community and challenge our development team to ship amazing, powerful new features without introducing breaking changes. Therefore, we have shipped a variety of robust features to Laravel 9 without breaking backwards compatibility. 10 | 11 | Therefore, this commitment to ship great new features during the current release will likely lead to future "major" releases being primarily used for "maintenance" tasks such as upgrading upstream dependencies, which can be seen in these release notes. 12 | 13 | Laravel 11 continues the improvements made in Laravel 10.x by introducing argument and return types to all application skeleton methods, as well as all stub files used to generate classes throughout the framework. In addition, a new, developer-friendly abstraction layer has been introduced for starting and interacting with external processes. Further, Laravel Pennant has been introduced to provide a wonderful approach to managing your application's "feature flags". 14 | 15 | ## PHP 8.2.0 or greater. 16 | Laravel 11.x requires a minimum PHP version of 8.2.0 or greater. 17 | 18 | ## curl 7.34.0 Required 19 | Laravel's HTTP client now requires curl 7.34.0 or greater. 20 | 21 | 22 | ## Features 23 | 24 | * User Authentication 25 | * Role-Permissions for Users 26 | * Bootstrap 5, CoreUI 27 | * Landing Page 28 | * Tailwind 29 | 30 | 31 | # User Guide 32 | 33 | ## Installation 34 | 35 | Follow the steps mentioned below to install and run the project. 36 | 37 | 1. Clone or download the repository 38 | 2. Go to the project directory (cd laavel-coreui) and run `composer install` and `npm install` 39 | 1. It will install all the laravel (PHP) packages by the command `composer install` (if you do not have `composer` then install it - https://getcomposer.org/download/) 40 | 2. It will install all the NPM packages by the command `npm install` (if you do not have npm then install it - https://nodejs.org/en/download) 41 | 3. Create `.env` file by copying the `.env.example`. You may use the command to do that `cp .env.example .env` 42 | 4. Run the command `composer run-script post-create-project-cmd` to APP_KEY 43 | 5. Update the database name and credentials in `.env` file 44 | 6. Run the command `php artisan migrate --seed` 45 | 7. Run the command `php artisan db:seed --class=UserSeeder` to create user, it will generate super admin `super@admin.com` and the password is `secret` 46 | 8. Link storage directory: `php artisan storage:link` 47 | 9. You may create a virtualhost entry to access the application or run `php artisan serve` from the project root and visit `http://127.0.0.1:8000` 48 | 49 | OR 50 | 51 | Using the Docker, you may run the project 52 | 53 | 1. docker-compose up 54 | 55 | Important note: if you get broken page then run the command `npm run dev` or `npm run build` 56 | 57 | # Screenshots 58 | Login View 59 |  60 | 61 | Dashboard View 62 |  63 | 64 | Users View 65 |  66 | 67 | Roles View 68 |  69 | 70 | Permissions View 71 |  72 | 73 | ## Release 74 | 75 | ### Laravel 10 76 | Tags 77 | v1.0-beta 78 | v1.0.1 79 | ### Laravel 11 80 | Tags 81 | v2.0.0 82 | 83 | 84 | ## License 85 | 86 | The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). 87 | -------------------------------------------------------------------------------- /app/Console/Commands/CreateRoutePermissionsCommand.php: -------------------------------------------------------------------------------- 1 | getRoutes(); 46 | 47 | foreach ($routes as $route) { 48 | if ($route->getName() != '' && $route->getAction()['middleware']['0'] == 'web') { 49 | $permission = Permission::where('name', $route->getName())->first(); 50 | 51 | if (is_null($permission)) { 52 | permission::create(['name' => $route->getName()]); 53 | } 54 | } 55 | } 56 | 57 | $this->info('Permission routes added successfully.'); 58 | } 59 | } -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 16 | } 17 | 18 | /** 19 | * Register the commands for the application. 20 | */ 21 | protected function commands(): void 22 | { 23 | $this->load(__DIR__.'/Commands'); 24 | 25 | require base_path('routes/console.php'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | , \Psr\Log\LogLevel::*> 14 | */ 15 | protected $levels = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * A list of the exception types that are not reported. 21 | * 22 | * @var array{{ __('Before proceeding, please check your email for a verification link.') }}
16 |{{ __('If you did not receive the email') }},
17 | 18 | 28 | 29 |2 | @lang("Displaing all the values of :module_name (Id: :id)", ['module_name'=>ucwords($module_name_singular), 'id'=>$$module_name_singular->id]). 3 |
4 |11 | 12 | @lang('Name') 13 | 14 | | 15 |16 | 17 | @lang('Value') 18 | 19 | | 20 |
---|---|
26 | 27 | {{ __(label_case($column->Field)) }} 28 | 29 | | 30 |31 | {!! show_column_value($$module_name_singular, $column) !!} 32 | | 33 |
Name | 27 |Guard | 28 |29 | | ||
---|---|---|---|---|
{{ $permission->name }} | 35 |{{ $permission->guard_name }} | 36 |Edit | 38 |39 | 44 | | 45 |
No | 25 |Name | 26 |Permissions | 27 |Action | 28 |||
---|---|---|---|---|---|
{{ $role->id }} | 32 |{{ $role->name }} | 33 |34 | @foreach ($role->permissions as $perm) 35 | {{ $perm->name }} 36 | @endforeach 37 | | 38 |39 | Show 40 | | 41 |42 | Edit 43 | | 44 |45 | 50 | | 51 |
# | 26 |Name | 27 |Username | 29 |Roles | 30 |31 | | |||
---|---|---|---|---|---|---|---|
{{ $user->id }} | 37 |{{ $user->name }} | 38 |{{ $user->email }} | 39 |{{ $user->username }} | 40 |41 | @foreach($user->roles as $role) 42 | {{ $role->name }} 43 | @endforeach 44 | | 45 |Show | 46 |Edit | 47 |48 | 53 | | 54 |