├── public
├── favicon.ico
├── robots.txt
├── .htaccess
└── index.php
├── resources
├── css
│ └── app.css
├── js
│ ├── src
│ │ ├── components
│ │ │ ├── table
│ │ │ │ ├── Tr.vue
│ │ │ │ ├── TBody.vue
│ │ │ │ ├── THead.vue
│ │ │ │ ├── Td.vue
│ │ │ │ ├── Th.vue
│ │ │ │ └── Table.vue
│ │ │ ├── ui
│ │ │ │ ├── SaveButton.vue
│ │ │ │ ├── EditButton.vue
│ │ │ │ ├── DeleteButton.vue
│ │ │ │ ├── CreateButton.vue
│ │ │ │ ├── 401.vue
│ │ │ │ ├── FormLabelError.vue
│ │ │ │ ├── Spinner.vue
│ │ │ │ ├── Button.vue
│ │ │ │ ├── FormInput.vue
│ │ │ │ └── Slider.vue
│ │ │ └── page
│ │ │ │ ├── AuthorizationFallback.vue
│ │ │ │ ├── PermissionSlider.vue
│ │ │ │ └── ConfirmModal.vue
│ │ ├── utils
│ │ │ └── axios.js
│ │ ├── layouts
│ │ │ ├── suspense-fallback
│ │ │ │ └── Default.vue
│ │ │ ├── SuspenseFallback.vue
│ │ │ ├── LayoutRenderer.vue
│ │ │ ├── LayoutFull.vue
│ │ │ ├── LayoutDashboard.vue
│ │ │ └── PageLoader.vue
│ │ ├── composables
│ │ │ ├── useAuth.js
│ │ │ ├── useModalToast.js
│ │ │ ├── useAppRouter.js
│ │ │ ├── useUtils.js
│ │ │ ├── useSlider.js
│ │ │ ├── useTheme.js
│ │ │ ├── useValidation.js
│ │ │ └── useHttpRequest.js
│ │ ├── store
│ │ │ ├── useRoleStore.js
│ │ │ ├── usePermissionStore.js
│ │ │ └── useUserStore.js
│ │ ├── assets
│ │ │ └── css
│ │ │ │ └── vue-select-override.css
│ │ ├── router
│ │ │ ├── index.js
│ │ │ └── routes.js
│ │ ├── directives
│ │ │ └── focus.js
│ │ └── pages
│ │ │ ├── Permissions.vue
│ │ │ ├── Roles.vue
│ │ │ ├── Login.vue
│ │ │ └── Users.vue
│ ├── App.vue
│ ├── app.js
│ └── app.css
└── views
│ └── app.blade.php
├── database
├── .gitignore
├── migrations
│ ├── 2023_11_25_192216_create_roles_table.php
│ ├── 2023_11_25_192233_create_permissions_table.php
│ ├── 2014_10_12_100000_create_password_reset_tokens_table.php
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2019_08_19_000000_create_failed_jobs_table.php
│ ├── 2023_11_25_192311_create_role_user_table.php
│ ├── 2023_11_25_192402_create_permission_role_table.php
│ └── 2019_12_14_000001_create_personal_access_tokens_table.php
├── seeders
│ ├── PermissionRoleTableSeeder.php
│ ├── DatabaseSeeder.php
│ ├── RoleTableSeeder.php
│ ├── RoleUserTableSeeder.php
│ ├── PermissionTableSeeder.php
│ └── UserTableSeeder.php
└── factories
│ └── UserFactory.php
├── bootstrap
├── cache
│ └── .gitignore
└── app.php
├── storage
├── logs
│ └── .gitignore
├── app
│ ├── public
│ │ └── .gitignore
│ └── .gitignore
└── framework
│ ├── testing
│ └── .gitignore
│ ├── views
│ └── .gitignore
│ ├── cache
│ ├── data
│ │ └── .gitignore
│ └── .gitignore
│ ├── sessions
│ └── .gitignore
│ └── .gitignore
├── postcss.config.js
├── routes
├── web.php
├── channels.php
├── console.php
└── api.php
├── tests
├── TestCase.php
├── Unit
│ └── ExampleTest.php
├── Feature
│ └── ExampleTest.php
└── CreatesApplication.php
├── .gitattributes
├── .prettierrc.json
├── .editorconfig
├── .gitignore
├── app
├── Http
│ ├── Controllers
│ │ ├── Controller.php
│ │ ├── AuthController.php
│ │ ├── RoleController.php
│ │ ├── PermissionController.php
│ │ └── UserController.php
│ ├── Middleware
│ │ ├── EncryptCookies.php
│ │ ├── VerifyCsrfToken.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── Authenticate.php
│ │ ├── ValidateSignature.php
│ │ ├── TrustProxies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ └── EnsureUserHasPermission.php
│ └── Kernel.php
├── Models
│ ├── Permission.php
│ ├── Role.php
│ └── User.php
├── Providers
│ ├── BroadcastServiceProvider.php
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Traits
│ ├── Helpers.php
│ └── Error.php
├── Console
│ └── Kernel.php
└── Exceptions
│ └── Handler.php
├── config
├── cors.php
├── services.php
├── view.php
├── hashing.php
├── broadcasting.php
├── filesystems.php
├── sanctum.php
├── cache.php
├── queue.php
├── mail.php
├── auth.php
├── logging.php
├── database.php
└── app.php
├── package.json
├── phpunit.xml
├── .env.example
├── artisan
├── vite.config.js
├── composer.json
├── tailwind.config.js
└── README.md
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite*
2 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/resources/js/src/components/table/Tr.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/resources/js/src/components/table/TBody.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/resources/js/src/components/table/Th.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | compiled.php
2 | config.php
3 | down
4 | events.scanned.php
5 | maintenance.php
6 | routes.php
7 | routes.scanned.php
8 | schedule-*
9 | services.json
10 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 |
2 |
| Id | 72 |Permission | 73 |Action | 74 |
|---|---|---|
| {{ permission?.id }} | 83 |
84 |
87 | {{ permission?.name }}
88 |
89 | |
90 |
91 |
92 |
93 |
100 | |
101 |
| Sl | 13 |Role | 14 |Email Address | 15 |Password | 16 |
|---|---|---|---|
| 01 | 21 |Super Admin | 22 |sadmin@sadmin.com | 23 |password | 24 |
| 02 | 29 |Admin | 30 |admin@admin.com | 31 |password | 32 |
| 03 | 37 |Author | 38 |author@author.com | 39 |password | 40 |
| 04 | 45 |Editor | 46 |editor@editor.com | 47 |password | 48 |
| 05 | 53 |User | 54 |user@user.com | 55 |password | 56 |
| 06 | 61 |User | 62 |user1@user.com | 63 |password | 64 |
| 07 | 69 |User | 70 |user2@user.com | 71 |password | 72 |
| 08 | 77 |User | 78 |user3@user.com | 79 |password | 80 |
| 09 | 85 |User | 86 |user4@user.com | 87 |password | 88 |
100 |103 | 104 | Copy the contents of .env.example to .env file. Fill up the database credentials(DB_DATABASE, DB_USERNAME, DB_PASSWORD) according to your database. At the root of your project run the following commands on terminal sequentially. 105 | 106 |composer install101 |npm install102 |
107 |111 | 112 | This will store all the default data into the database. Then compile the assets and run development server by 113 | 114 |php artisan key:generate108 |php artisan migrate109 |php artisan db:seed110 |
115 | npm run dev
116 |
117 |
118 | Finally initiate your server on a new terminal and enjoy !!!
119 |
120 |
121 | php artisan serve
122 |
123 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Deprecations Log Channel
26 | |--------------------------------------------------------------------------
27 | |
28 | | This option controls the log channel that should be used to log warnings
29 | | regarding deprecated PHP and library features. This allows you to get
30 | | your application ready for upcoming major versions of dependencies.
31 | |
32 | */
33 |
34 | 'deprecations' => [
35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
36 | 'trace' => false,
37 | ],
38 |
39 | /*
40 | |--------------------------------------------------------------------------
41 | | Log Channels
42 | |--------------------------------------------------------------------------
43 | |
44 | | Here you may configure the log channels for your application. Out of
45 | | the box, Laravel uses the Monolog PHP logging library. This gives
46 | | you a variety of powerful log handlers / formatters to utilize.
47 | |
48 | | Available Drivers: "single", "daily", "slack", "syslog",
49 | | "errorlog", "monolog",
50 | | "custom", "stack"
51 | |
52 | */
53 |
54 | 'channels' => [
55 | 'stack' => [
56 | 'driver' => 'stack',
57 | 'channels' => ['single'],
58 | 'ignore_exceptions' => false,
59 | ],
60 |
61 | 'single' => [
62 | 'driver' => 'single',
63 | 'path' => storage_path('logs/laravel.log'),
64 | 'level' => env('LOG_LEVEL', 'debug'),
65 | 'replace_placeholders' => true,
66 | ],
67 |
68 | 'daily' => [
69 | 'driver' => 'daily',
70 | 'path' => storage_path('logs/laravel.log'),
71 | 'level' => env('LOG_LEVEL', 'debug'),
72 | 'days' => 14,
73 | 'replace_placeholders' => true,
74 | ],
75 |
76 | 'slack' => [
77 | 'driver' => 'slack',
78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
79 | 'username' => 'Laravel Log',
80 | 'emoji' => ':boom:',
81 | 'level' => env('LOG_LEVEL', 'critical'),
82 | 'replace_placeholders' => true,
83 | ],
84 |
85 | 'papertrail' => [
86 | 'driver' => 'monolog',
87 | 'level' => env('LOG_LEVEL', 'debug'),
88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
89 | 'handler_with' => [
90 | 'host' => env('PAPERTRAIL_URL'),
91 | 'port' => env('PAPERTRAIL_PORT'),
92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
93 | ],
94 | 'processors' => [PsrLogMessageProcessor::class],
95 | ],
96 |
97 | 'stderr' => [
98 | 'driver' => 'monolog',
99 | 'level' => env('LOG_LEVEL', 'debug'),
100 | 'handler' => StreamHandler::class,
101 | 'formatter' => env('LOG_STDERR_FORMATTER'),
102 | 'with' => [
103 | 'stream' => 'php://stderr',
104 | ],
105 | 'processors' => [PsrLogMessageProcessor::class],
106 | ],
107 |
108 | 'syslog' => [
109 | 'driver' => 'syslog',
110 | 'level' => env('LOG_LEVEL', 'debug'),
111 | 'facility' => LOG_USER,
112 | 'replace_placeholders' => true,
113 | ],
114 |
115 | 'errorlog' => [
116 | 'driver' => 'errorlog',
117 | 'level' => env('LOG_LEVEL', 'debug'),
118 | 'replace_placeholders' => true,
119 | ],
120 |
121 | 'null' => [
122 | 'driver' => 'monolog',
123 | 'handler' => NullHandler::class,
124 | ],
125 |
126 | 'emergency' => [
127 | 'path' => storage_path('logs/laravel.log'),
128 | ],
129 | ],
130 |
131 | ];
132 |
--------------------------------------------------------------------------------
/resources/js/src/pages/Roles.vue:
--------------------------------------------------------------------------------
1 |
48 |
49 |
50 | | Id | 63 |Role | 64 |Permissions | 65 |Action | 66 |
|---|---|---|---|
| {{ role?.id }} | 75 |
76 |
79 | {{ role?.name }}
80 |
81 | |
82 |
83 |
84 |
|
94 |
95 |
96 |
101 | |
102 |
| Id | 59 |User | 60 |Roles | 61 |Permissions | 62 |Action | 63 |
|---|---|---|---|---|
| {{ user?.id }} | 72 |
73 |
76 | {{ user?.name }}
77 |
78 |
79 | {{ user?.email }}
80 |
81 | |
82 |
83 |
|
93 |
94 |
|
104 |
105 |
106 |
111 | |
112 |