├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Exports │ ├── UserCollectionExport.php │ ├── UserMappingExport.php │ ├── UserQueryExport.php │ └── UserViewExport.php ├── Helpers │ └── FileHelpers.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ └── ResetPasswordController.php │ │ ├── Controller.php │ │ └── Dashboard │ │ │ ├── CommonController.php │ │ │ ├── HomeController.php │ │ │ ├── PdfController.php │ │ │ ├── PermissionController.php │ │ │ ├── RoleController.php │ │ │ └── UserController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── LoginRequest.php │ │ ├── PermissionRequest.php │ │ ├── RoleRequest.php │ │ └── UserRequest.php ├── Permission.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Role.php └── User.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── excel.php ├── filesystems.php ├── hashing.php ├── jsvalidation.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php ├── snappy.php ├── ui.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ └── 2019_05_08_0000012_create_permission_tables.php └── seeds │ ├── DatabaseSeeder.php │ ├── PermissionsTableSeeder.php │ ├── RolesTableSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── robots.txt └── web.config ├── resources ├── fonts │ ├── classycb9b.eot │ ├── classycb9b.svg │ ├── classycb9b.ttf │ ├── classycb9b.woff │ ├── cryptocoins.ttf │ ├── cryptocoins.woff │ ├── cryptocoins.woff2 │ ├── flaticon.woff │ ├── fontawesome-webfont3e6e.eot │ ├── fontawesome-webfont3e6e.svg │ ├── fontawesome-webfont3e6e.ttf │ ├── fontawesome-webfont3e6e.woff │ ├── fontawesome-webfont3e6e.woff2 │ ├── fontawesome-webfontd41d.eot │ ├── themify9f24.eot │ ├── themify9f24.svg │ ├── themify9f24.ttf │ ├── themify9f24.woff │ ├── themifyd41d.eot │ └── ui-icons.woff2 ├── img │ └── logo.png ├── js │ ├── bootstrap.js │ └── dashboard │ │ ├── app.js │ │ └── demo │ │ ├── chart-area-demo.js │ │ ├── chart-bar-demo.js │ │ ├── chart-pie-demo.js │ │ └── datatables-demo.js ├── lang │ ├── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ └── es_CL.UTF-8 │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ └── dashboard │ │ ├── _buttons.scss │ │ ├── _cards.scss │ │ ├── _charts.scss │ │ ├── _dropdowns.scss │ │ ├── _error.scss │ │ ├── _footer.scss │ │ ├── _global.scss │ │ ├── _login.scss │ │ ├── _mixins.scss │ │ ├── _navs.scss │ │ ├── _utilities.scss │ │ ├── _variables.scss │ │ ├── app.scss │ │ ├── navs │ │ ├── _global.scss │ │ ├── _sidebar.scss │ │ └── _topbar.scss │ │ └── utilities │ │ ├── _animation.scss │ │ ├── _background.scss │ │ ├── _border.scss │ │ ├── _display.scss │ │ ├── _progress.scss │ │ ├── _rotate.scss │ │ └── _text.scss └── views │ ├── auth │ ├── layout.blade.php │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── dashboard │ ├── common │ │ ├── form_buttons.blade.php │ │ ├── message.blade.php │ │ ├── navbar.blade.php │ │ └── topbar.blade.php │ ├── exports │ │ └── users │ │ │ └── export.blade.php │ ├── index.blade.php │ ├── layout.blade.php │ ├── pdfs │ │ └── index.blade.php │ ├── permissions │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── partials │ │ │ └── form.blade.php │ ├── roles │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── partials │ │ │ └── form.blade.php │ └── users │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ └── partials │ │ └── form.blade.php │ ├── pdf │ └── invoice.blade.php │ └── vendor │ └── jsvalidation │ ├── bootstrap.php │ └── bootstrap4.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .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 └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME='Mi Aplicacion' 2 | APP_TITLE='Mi Aplicacion' 3 | APP_KEY= 4 | APP_DEBUG=false 5 | APP_ENV=production 6 | APP_URL=https://www.miaplicacion.cl 7 | 8 | LOG_CHANNEL=stack 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_DATABASE=homestead 14 | DB_USERNAME=homestead 15 | DB_PASSWORD=secret 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=120 22 | 23 | APP_LOCALE=es_CL.UTF-8 24 | APP_TIMEZONE='America/Santiago' 25 | 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_DRIVER=smtp 32 | MAIL_HOST=smtp.mailtrap.io 33 | MAIL_PORT=2525 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | 38 | AWS_ACCESS_KEY_ID= 39 | AWS_SECRET_ACCESS_KEY= 40 | AWS_DEFAULT_REGION=us-east-1 41 | AWS_BUCKET= 42 | 43 | PUSHER_APP_ID= 44 | PUSHER_APP_KEY= 45 | PUSHER_APP_SECRET= 46 | PUSHER_APP_CLUSTER=mt1 47 | 48 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 49 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 50 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/mix-manifest.json 4 | /public/js 5 | /public/css 6 | /public/img 7 | /public/fonts 8 | /public/vendor 9 | /public/storage 10 | /storage/*.key 11 | /vendor 12 | .env 13 | .phpunit.result.cache 14 | Homestead.json 15 | Homestead.yaml 16 | npm-debug.log 17 | yarn-error.log 18 | composer.lock 19 | package-lock.json 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Admin Panel 2 | 3 | [![N|Solid](https://camo.githubusercontent.com/5ceadc94fd40688144b193fd8ece2b805d79ca9b/68747470733a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f636f6d706f6e656e74732f6c6f676f2d6c61726176656c2e737667)](https://laravel.com/)[![N|Solid](https://c.disquscdn.com/uploads/users/7757/9394/avatar92.jpg?1549409473)](https://github.com/BlackrockDigital/startbootstrap-sb-admin-2) 4 | 5 | Siempre es un problema el no tener por donde comenzar hay tantos paneles de administración con mucho codigo Espagueti por todos lados, mezclas de jquery etc..... 6 | 7 | Este admin panel esta hecho para facilitar la vida a quienes quieran comenzar con el hermoso framework de laravel :heart: usando como base de front lo que nos entregan en https://startbootstrap.com/themes/sb-admin-2/ Se mantendra actualizado con la ultima versión de laravel y contendra ejemplo de usos de variadas librerias. 8 | 9 | ![N|Solid](https://i.ibb.co/5jGF2jS/Captura-de-Pantalla-2019-06-10-a-la-s-12-53-45.png)![N|Solid](https://i.ibb.co/VD2zq4b/Captura-de-Pantalla-2019-06-10-a-la-s-12-53-34.png)![N|Solid](https://i.ibb.co/6rryTsX/Captura-de-Pantalla-2019-06-17-a-la-s-00-05-50.png)![N|Solid](https://i.ibb.co/jZSMhj4/screencapture-127-0-0-1-8000-dashboard-pdfs-2019-06-20-12-32-46.png) 10 | 11 | El panel de administración cuenta con lo siguiente : 12 | 13 | 14 | ### Packages 15 | 16 | 17 | 18 | | package | README | 19 | | ------ | ------ | 20 | | Permisos y Roles - laravel-permission | [GitHub](https://github.com/spatie/laravel-permission) | 21 | | Validación de formularios - laravel-jsvalidation | [GitHub](https://github.com/proengsoft/laravel-jsvalidation) 22 | | Exportación de Excel - laravel-excel | [GitHub](https://github.com/maatwebsite/Laravel-Excel) 23 | | Exportación de pdf - laravel-snappy | [GitHub](https://github.com/barryvdh/laravel-snappy) 24 | 25 | 26 | OJO con este package, es necesario instalar un binario en tu maquina, que puedes descargar aqui https://wkhtmltopdf.org/downloads.html 27 | 28 | Cuando sea instalado en tu maquina debes configurar en config/snappy.php la direccion del binario 29 | 30 | 31 | 32 | ```sh 33 | 'binary' => '/usr/local/bin/wkhtmltopdf-amd64', 34 | ``` 35 | 36 | ### Package NPM 37 | 38 | 39 | 40 | | package | README | 41 | | ------ | ------ | 42 | | @fortawesome/fontawesome-free | [Package](https://www.npmjs.com/package/@fortawesome/fontawesome-free) | 43 | | datatables.net | [Package](https://www.npmjs.com/package/datatables.net) 44 | | datatables.net-bs | [Package](https://www.npmjs.com/package/datatables.net-bs) 45 | | datatables.net-responsive | [Package](https://www.npmjs.com/package/datatables.net-responsive) 46 | | datatables.net-responsive-bs | [Package](https://www.npmjs.com/package/datatables.net-responsive-bs) 47 | | daterangepicker | [Package](https://www.npmjs.com/package/daterangepicker) 48 | | moment | [Package](https://www.npmjs.com/package/moment) 49 | | select2 | [Package](https://www.npmjs.com/package/select2) 50 | | select2-bootstrap-theme | [Package](https://www.npmjs.com/package/select2-bootstrap-theme) 51 | | switchery | [Package](https://www.npmjs.com/package/switchery) 52 | | sweetalert2 | [Package](https://www.npmjs.com/package/sweetalert2) 53 | | @ckeditor/ckeditor5-build-decoupled-document | [Package](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-decoupled-document) 54 | 55 | 56 | 57 | ### Instalación 58 | 59 | Requisitos previos : 60 | 61 | PHP 7.2 > 62 | 63 | [Laravel](https://laravel.com/) 64 | 65 | [NodeJs o NPM](https://nodejs.org/es/) 66 | 67 | [Composer](https://getcomposer.org/) 68 | 69 | Install the dependencies and devDependencies and start the server. 70 | 71 | ```sh 72 | $ git clone https://github.com/DiruzCode/laravel-admin-template.git 73 | $ cd laravel-admin-template 74 | $ npm install 75 | $ composer install 76 | ``` 77 | 78 | Configurar Laravel-mix ... 79 | 80 | ```sh 81 | $ npm run dev 82 | ``` 83 | Configurar .env ... 84 | 85 | ```sh 86 | $ cp .env.example .env 87 | $ php artisan key:generate 88 | ``` 89 | 90 | Base de datos ... 91 | 92 | ```sh 93 | $ php artisan migrate --seed 94 | ``` 95 | 96 | 97 | Arranca Laravel, puedes usar diferentes formas 98 | 99 | ```sh 100 | $ php artisan serve 101 | $ php artisan serve --port=port 102 | $ php artisan serve --host=myhost --port=port 103 | ``` 104 | Por defecto correra en la siguiente ip 105 | ```sh 106 | 127.0.0.1:8000 107 | ``` 108 | 109 | ### Desarrolladores 110 | 111 | Quieren contribuir? Genial! son libres de hacerlo :D 112 | 113 | 114 | ## Licencia 115 | 116 | Este panel de administrador en Laravel framework es de codigo abierto bajo la licencia [MIT license](https://opensource.org/licenses/MIT). 117 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 61 | return response()->json(['error' => 'Unauthenticated.'], 401); 62 | } 63 | 64 | return redirect()->route('login.form'); 65 | } 66 | 67 | public function render($request, Exception $exception) 68 | { 69 | 70 | if ($request->wantsJson()) { 71 | 72 | if($exception instanceof \Illuminate\Auth\AuthenticationException ){ 73 | return response()->json(['error' => 'Unauthorized.'], 401); 74 | } 75 | 76 | if($exception instanceof \Laravel\Passport\Exceptions\MissingScopeException ){ 77 | return response()->json(['error' => 'AccessDenied.'], 403); 78 | } 79 | 80 | if ($exception instanceof \League\OAuth2\Server\Exception\OAuthServerException && $exception->getCode() == 9) { 81 | return response()->json(['error' => 'Unauthorized.'], 401); 82 | } 83 | 84 | } 85 | 86 | if($exception instanceof \Illuminate\Auth\AuthenticationException ){ 87 | return redirect()->route('login.form'); 88 | } 89 | 90 | return parent::render($request, $exception); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/Exports/UserCollectionExport.php: -------------------------------------------------------------------------------- 1 | id, 25 | $model->created_at 26 | ]; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/Exports/UserQueryExport.php: -------------------------------------------------------------------------------- 1 | User::all() 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Helpers/FileHelpers.php: -------------------------------------------------------------------------------- 1 | 1024; $i++) { 37 | $bytes /= 1024; 38 | } 39 | 40 | return round($bytes, 2) . ' ' . $units[$i]; 41 | } 42 | 43 | public static function faIcon($extension) 44 | { 45 | switch ($extension){ 46 | case 'doc': 47 | case 'docx': 48 | return 'fa-file-word-o'; 49 | break; 50 | case 'xls': 51 | case 'xlsx': 52 | return 'fa-file-excel-o'; 53 | break; 54 | case 'pdf': 55 | return 'fa-file-pdf-o'; 56 | break; 57 | case 'zip': 58 | case 'rar': 59 | return 'fa-file-archive-o'; 60 | break; 61 | case 'jpg': 62 | case 'jpeg': 63 | case 'png': 64 | case 'gif': 65 | return 'fa-file-picture-o'; 66 | break; 67 | case 'ppt': 68 | case 'pptx': 69 | return 'fa-file-powerpoint-o'; 70 | break; 71 | default: 72 | return 'fa-file-o'; 73 | break; 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 41 | } 42 | 43 | /** 44 | * @inheritdoc 45 | */ 46 | protected function credentials(Request $request) 47 | { 48 | 49 | // User must be active to login 50 | return array_merge( 51 | ['access_web' => true], 52 | $request->only($this->username(), 'password') 53 | ); 54 | 55 | } 56 | 57 | /** 58 | * @inheritdoc 59 | */ 60 | protected function authenticated(Request $request, $user) 61 | { 62 | // Registering last user login date and time 63 | $user->last_login = Carbon::now(); 64 | $user->save(); 65 | } 66 | 67 | /** 68 | * Log the user out of the application. 69 | * 70 | * @param \Illuminate\Http\Request $request 71 | * @return \Illuminate\Http\Response 72 | */ 73 | public function logout(Request $request) 74 | { 75 | $this->guard()->logout(); 76 | 77 | $request->session()->flush(); 78 | 79 | $request->session()->regenerate(); 80 | 81 | return redirect('/login'); 82 | } 83 | 84 | /** 85 | * Show the application's login form. 86 | * 87 | * @return \Illuminate\Http\Response 88 | */ 89 | 90 | 91 | /** 92 | * Handle a login request to the application. 93 | * 94 | * @param \Illuminate\Http\Request $request 95 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response 96 | */ 97 | public function login(Request $request) 98 | { 99 | $this->validateLogin($request); 100 | 101 | // If the class is using the ThrottlesLogins trait, we can automatically throttle 102 | // the login attempts for this application. We'll key this by the username and 103 | // the IP address of the client making these requests into this application. 104 | if ($this->hasTooManyLoginAttempts($request)) { 105 | $this->fireLockoutEvent($request); 106 | 107 | return $this->sendLockoutResponse($request); 108 | } 109 | 110 | if ($this->attemptLogin($request)) { 111 | return $this->sendLoginResponse($request); 112 | } 113 | 114 | // If the login attempt was unsuccessful we will increment the number of attempts 115 | // to login and redirect the user back to the login form. Of course, when this 116 | // user surpasses their maximum number of attempts they will get locked out. 117 | $this->incrementLoginAttempts($request); 118 | 119 | return $this->sendFailedLoginResponse($request); 120 | } 121 | 122 | 123 | protected function sendFailedLoginResponse(Request $request) 124 | { 125 | 126 | // Load user from database 127 | $user = User::where($this->username(), $request->{$this->username()})->first(); 128 | 129 | if($user){ 130 | 131 | if(!$user->access_web){ 132 | return redirect()->back()->with([ 133 | 'message' => 'La cuenta no tiene acceso a la web', 134 | 'level' => 'warning' 135 | ]); 136 | } 137 | 138 | if (\Hash::check($request->password, $user->password)) { 139 | return redirect()->back()->with([ 140 | 'message' => 'Las credenciales son invalidas', 141 | 'level' => 'warning' 142 | ]); 143 | } 144 | 145 | }else{ 146 | 147 | return redirect()->back()->with([ 148 | 'message' => 'Las credenciales son invalidas', 149 | 'level' => 'warning' 150 | ]); 151 | 152 | } 153 | 154 | } 155 | 156 | } 157 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|string|max:255', 52 | 'email' => 'required|string|email|max:255|unique:users', 53 | 'password' => 'required|string|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return \App\User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => $data['password'], 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | json(str_slug($text)); 14 | } 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Controllers/Dashboard/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 14 | } 15 | 16 | 17 | public function index() 18 | { 19 | return view('dashboard.index'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Controllers/Dashboard/PdfController.php: -------------------------------------------------------------------------------- 1 | get('content_textarea')); 22 | return $pdf->download('export.pdf'); 23 | 24 | } 25 | 26 | 27 | public function export_document_url(Request $request) 28 | { 29 | $pdf = PDF::loadFile($request->get('url')); 30 | return $pdf->download('url.pdf'); 31 | 32 | } 33 | 34 | 35 | public function export_by_view() 36 | { 37 | $pdf = PDF::loadView('pdf.invoice', []); 38 | return $pdf->download('view.pdf'); 39 | 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Controllers/Dashboard/PermissionController.php: -------------------------------------------------------------------------------- 1 | has('search')) { 20 | $search = $request->get('search'); 21 | $permissions->where(function ($q) use ($search) { 22 | $q->orWhere('name', 'like', "%$search%"); 23 | }); 24 | } 25 | 26 | return view('dashboard.permissions.index', [ 27 | 'items' => $permissions->paginate(config('ui.dashboard.page_size')), 28 | 'page' => $request->query('page') 29 | ]); 30 | } 31 | 32 | public function create(Request $request) { 33 | 34 | $page = $request->query('page'); 35 | $roles = Role::orderBy('name', 'asc')->pluck('name', 'id'); 36 | return view('dashboard.permissions.create', [ 37 | 'roles' => $roles, 38 | 'role_id' => $request->old('role_id'), 39 | 'page' => $request->query('page'), 40 | 'cancel_link' => route('dashboard::permissions.index', ['page' => $page]) 41 | ]); 42 | 43 | } 44 | 45 | public function store(PermissionRequest $request) { 46 | 47 | \DB::beginTransaction(); 48 | 49 | $permission = Permission::create([ 50 | 'display_name' => $request->get('display_name'), 51 | 'name' => $request->get('name'), 52 | 'description' => $request->get('description'), 53 | ]); 54 | 55 | \DB::commit(); 56 | 57 | return redirect()->route('dashboard::permissions.index')->with([ 58 | 'message' => "Se creado el permiso ". $permission->display_name, 59 | 'level' => 'success' 60 | ]); 61 | 62 | } 63 | 64 | public function edit(Request $request, $id) 65 | { 66 | $page = $request->query('page'); 67 | 68 | $permission = Permission::findOrFail($id); 69 | return view('dashboard.permissions.edit', [ 70 | 'model' => $permission, 71 | 'page' => $request->query('page'), 72 | 'cancel_link' => route('dashboard::permissions.index', ['page' => $page]) 73 | ]); 74 | } 75 | 76 | public function update(PermissionRequest $request, $id) { 77 | 78 | 79 | \DB::beginTransaction(); 80 | 81 | $permission = Permission::findOrFail($id); 82 | 83 | $permission->update([ 84 | 'display_name' => $request->get('display_name'), 85 | 'name' => $request->get('name'), 86 | 'description' => $request->get('description'), 87 | ]); 88 | 89 | \DB::commit(); 90 | 91 | return redirect()->route('dashboard::permissions.index')->with([ 92 | 'message' => "Se ha Actualizado el permiso ". $permission->name, 93 | 'level' => 'success' 94 | ]); 95 | 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /app/Http/Controllers/Dashboard/RoleController.php: -------------------------------------------------------------------------------- 1 | $roles->paginate(config('ui.admin.page_size')), 22 | 'page' => $request->query('page') 23 | ]); 24 | } 25 | 26 | public function create(Request $request) { 27 | 28 | $page = $request->query('page'); 29 | $permissions = Permission::orderBy('name', 'asc')->pluck('name', 'id'); 30 | 31 | return view('dashboard.roles.create', [ 32 | 'cancel_link' => route('dashboard::roles.index', ['page' => $page]), 33 | 'permissions' => $permissions, 34 | 'permission_id' => (!is_null(old('permission_id')))? old('permission_id'):[], 35 | 'page' => $page, 36 | 37 | ]); 38 | 39 | } 40 | 41 | public function store(RoleRequest $request) 42 | { 43 | \DB::beginTransaction(); 44 | 45 | $role = Role::create([ 46 | 'display_name' => $request->get('display_name'), 47 | 'name' => $request->get('name'), 48 | 'description' => $request->get('description'), 49 | ]); 50 | 51 | $permissions = Permission::whereIn('id',$request->get('permission_id'))->get(); 52 | $role->syncPermissions($permissions); 53 | 54 | \DB::commit(); 55 | 56 | return redirect()->route('dashboard::roles.index')->with([ 57 | 'message' => "Se ha Actualizado el role ". $role->display_name, 58 | 'level' => 'success' 59 | ]); 60 | } 61 | 62 | public function edit(Request $request, $id) { 63 | $role = Role::findOrFail($id); 64 | $page = $request->query('page'); 65 | 66 | $permissions = Permission::orderBy('name', 'asc')->pluck('name', 'id'); 67 | 68 | return view('dashboard.roles.edit', [ 69 | 'model' => $role, 70 | 'permissions' => $permissions, 71 | 'permission_id' => $request->old('permission_id', $role->permissions->pluck('id')->toArray()), 72 | 'page' => $request->query('page'), 73 | 'cancel_link' => route('dashboard::roles.index', ['page' => $page]), 74 | ]); 75 | } 76 | 77 | public function update(RoleRequest $request, $id) 78 | { 79 | 80 | \DB::beginTransaction(); 81 | 82 | $role = Role::findOrFail($id); 83 | 84 | $role->update([ 85 | 'display_name' => $request->get('display_name'), 86 | 'name' => $request->get('name'), 87 | 'description' => $request->get('description'), 88 | ]); 89 | 90 | $permissions = Permission::whereIn('id',$request->get('permission_id'))->get(); 91 | 92 | $role->syncPermissions($permissions); 93 | 94 | \DB::commit(); 95 | 96 | return redirect()->route('dashboard::roles.index')->with([ 97 | 'message' => "Se ha Actualizado el role ". $role->name, 98 | 'level' => 'success' 99 | ]); 100 | } 101 | 102 | public function destroy(Role $role) 103 | { 104 | $role->delete(); 105 | 106 | return back()->with('info', 'Rol eliminado con éxito'); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 31 | \App\Http\Middleware\EncryptCookies::class, 32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 33 | \Illuminate\Session\Middleware\StartSession::class, 34 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 36 | \App\Http\Middleware\VerifyCsrfToken::class, 37 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 38 | ], 39 | 40 | 'api' => [ 41 | 'throttle:60,1', 42 | 'bindings', 43 | ], 44 | ]; 45 | 46 | /** 47 | * The application's route middleware. 48 | * 49 | * These middleware may be assigned to groups or used individually. 50 | * 51 | * @var array 52 | */ 53 | protected $routeMiddleware = [ 54 | 'auth' => \App\Http\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 58 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 59 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 60 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 61 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 62 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 63 | 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, 64 | 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, 65 | 66 | ]; 67 | 68 | /** 69 | * The priority-sorted list of middleware. 70 | * 71 | * This forces non-global middleware to always be in the given order. 72 | * 73 | * @var array 74 | */ 75 | protected $middlewarePriority = [ 76 | \Illuminate\Session\Middleware\StartSession::class, 77 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 78 | \App\Http\Middleware\Authenticate::class, 79 | \Illuminate\Session\Middleware\AuthenticateSession::class, 80 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 81 | \Illuminate\Auth\Middleware\Authorize::class, 82 | ]; 83 | } 84 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'required|email', 28 | 'password' => 'required' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/PermissionRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3|max:250', 28 | 'display_name' => 'min:3|max:250', 29 | 'description' => 'min:3|max:250' 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/RoleRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3|max:250|unique:roles', 28 | 'display_name' => 'min:3|max:250', 29 | 'description' => 'min:3|max:250', 30 | 'hidden' => 'sometimes|required|boolean', 31 | 'permission_id' => 'required|array|min:1' 32 | ]; 33 | 34 | /* 35 | * Verifico si estoy haciendo un update y agrego las reglas que se necesiten. 36 | * 37 | * Por ejemplo el email debo validar que no se este usando pero dejando fuera 38 | * de la validación al registro que se esta editando. 39 | */ 40 | if ($this->isMethod('patch') OR $this->isMethod('put')){ 41 | $rules = array_merge( 42 | $rules, 43 | [ 44 | 'name' => 'required|min:3|max:250|unique:roles,id,'.$this->role, 45 | ] 46 | ); 47 | } 48 | 49 | return $rules; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Http/Requests/UserRequest.php: -------------------------------------------------------------------------------- 1 | isMethod('patch')) { 18 | $id = $this->input('id'); 19 | $user = User::findOrFail($id); 20 | } 21 | 22 | return $this->user()->can(['crear-usuarios', 'editar-usuarios']); 23 | } 24 | 25 | /** 26 | * Get the validation rules that apply to the request. 27 | * 28 | * @return array 29 | */ 30 | public function rules() 31 | { 32 | 33 | $rules = [ 34 | 'rut' => 'required', 35 | 'first_name' => 'required', 36 | 'father_surname' => 'required', 37 | 'email' => 'required|email|unique:users,email', 38 | 'role_id' => 'required', 39 | 'password' => 'required_without:id|confirmed|min:8|max:30' 40 | ]; 41 | 42 | if ($this->id){ 43 | $rules = array_merge( 44 | $rules, 45 | [ 46 | 'email' => 'required|email|unique:users,email,'.$this->user, 47 | ] 48 | ); 49 | } 50 | 51 | 52 | 53 | return $rules; 54 | } 55 | 56 | 57 | public function messages() 58 | { 59 | return [ 60 | 'password.required_without' => 'El campo contraseña es obligatorio cuando no es una actualización.' 61 | ]; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/Permission.php: -------------------------------------------------------------------------------- 1 | forceScheme('https'); 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Role.php: -------------------------------------------------------------------------------- 1 | get(); 24 | } 25 | 26 | 27 | public static function getByName($name) 28 | { 29 | return Role::where('name', '=', str_slug($name))->first(); 30 | } 31 | 32 | 33 | 34 | public function permissions() 35 | { 36 | return $this->belongsToMany(Permission::class); 37 | } 38 | 39 | public function scopeName(Builder $query, $name){ 40 | 41 | if($name == null || trim($name) == ""){ 42 | return $query; 43 | } 44 | 45 | return $query->where('name', 'LIKE', '%'.$name.'%'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | attributes['password'] = bcrypt($password); 56 | } 57 | 58 | 59 | public function completeName() 60 | { 61 | return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'] . ' ' . $this->attributes['father_surname'] . ' ' . $this->attributes['mother_surname']; 62 | } 63 | 64 | public function routeNotificationForMail() 65 | { 66 | return $this->email; 67 | } 68 | 69 | 70 | public function toggleAccess($type) 71 | { 72 | $this->attributes[$type] = ($this->attributes[$type]) ? false : true; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.2.3", 12 | "barryvdh/laravel-snappy": "^0.4.4", 13 | "fideloper/proxy": "^4.0", 14 | "laravel/framework": "5.8.*", 15 | "laravel/tinker": "^1.0", 16 | "maatwebsite/excel": "^3.1", 17 | "proengsoft/laravel-jsvalidation": "^2.4", 18 | "spatie/laravel-permission": "^2.9" 19 | }, 20 | "require-dev": { 21 | "beyondcode/laravel-dump-server": "^1.0", 22 | "filp/whoops": "^2.0", 23 | "fzaninotto/faker": "^1.4", 24 | "mockery/mockery": "^1.0", 25 | "nunomaduro/collision": "^2.0", 26 | "phpunit/phpunit": "^7.5" 27 | }, 28 | "config": { 29 | "optimize-autoloader": true, 30 | "preferred-install": "dist", 31 | "sort-packages": true 32 | }, 33 | "extra": { 34 | "laravel": { 35 | "dont-discover": [] 36 | } 37 | }, 38 | "autoload": { 39 | "psr-4": { 40 | "App\\": "app/" 41 | }, 42 | "classmap": [ 43 | "database/seeds", 44 | "database/factories" 45 | ] 46 | }, 47 | "autoload-dev": { 48 | "psr-4": { 49 | "Tests\\": "tests/" 50 | } 51 | }, 52 | "minimum-stability": "dev", 53 | "prefer-stable": true, 54 | "scripts": { 55 | "post-autoload-dump": [ 56 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 57 | "@php artisan package:discover --ansi" 58 | ], 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ], 65 | "post-update-cmd": [ 66 | "php artisan vendor:publish --provider=\"Proengsoft\\JsValidation\\JsValidationServiceProvider\" --tag=public --force" 67 | ] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | ], 101 | ], 102 | 103 | ]; 104 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'encrypted' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Cache Stores 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may define all of the cache "stores" for your application as 29 | | well as their drivers. You may even define multiple stores for the 30 | | same cache driver to group types of items stored in your caches. 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | ], 43 | 44 | 'database' => [ 45 | 'driver' => 'database', 46 | 'table' => 'cache', 47 | 'connection' => null, 48 | ], 49 | 50 | 'file' => [ 51 | 'driver' => 'file', 52 | 'path' => storage_path('framework/cache/data'), 53 | ], 54 | 55 | 'memcached' => [ 56 | 'driver' => 'memcached', 57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 58 | 'sasl' => [ 59 | env('MEMCACHED_USERNAME'), 60 | env('MEMCACHED_PASSWORD'), 61 | ], 62 | 'options' => [ 63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 64 | ], 65 | 'servers' => [ 66 | [ 67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 68 | 'port' => env('MEMCACHED_PORT', 11211), 69 | 'weight' => 100, 70 | ], 71 | ], 72 | ], 73 | 74 | 'redis' => [ 75 | 'driver' => 'redis', 76 | 'connection' => 'cache', 77 | ], 78 | 79 | 'dynamodb' => [ 80 | 'driver' => 'dynamodb', 81 | 'key' => env('AWS_ACCESS_KEY_ID'), 82 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 83 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 84 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 85 | ], 86 | 87 | ], 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Cache Key Prefix 92 | |-------------------------------------------------------------------------- 93 | | 94 | | When utilizing a RAM based store such as APC or Memcached, there might 95 | | be other applications utilizing the same cache. So, we'll specify a 96 | | value to get prefixed to all our keys so we can avoid collisions. 97 | | 98 | */ 99 | 100 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 41 | ], 42 | 43 | 'mysql' => [ 44 | 'driver' => 'mysql', 45 | 'host' => env('DB_HOST', '127.0.0.1'), 46 | 'port' => env('DB_PORT', '3306'), 47 | 'database' => env('DB_DATABASE', 'forge'), 48 | 'username' => env('DB_USERNAME', 'forge'), 49 | 'password' => env('DB_PASSWORD', ''), 50 | 'unix_socket' => env('DB_SOCKET', ''), 51 | 'charset' => 'utf8mb4', 52 | 'collation' => 'utf8mb4_unicode_ci', 53 | 'prefix' => '', 54 | 'prefix_indexes' => true, 55 | 'strict' => true, 56 | 'engine' => null, 57 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 58 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 59 | ]) : [], 60 | ], 61 | 62 | 'pgsql' => [ 63 | 'driver' => 'pgsql', 64 | 'host' => env('DB_HOST', '127.0.0.1'), 65 | 'port' => env('DB_PORT', '5432'), 66 | 'database' => env('DB_DATABASE', 'forge'), 67 | 'username' => env('DB_USERNAME', 'forge'), 68 | 'password' => env('DB_PASSWORD', ''), 69 | 'charset' => 'utf8', 70 | 'prefix' => '', 71 | 'prefix_indexes' => true, 72 | 'schema' => 'public', 73 | 'sslmode' => 'prefer', 74 | ], 75 | 76 | 'sqlsrv' => [ 77 | 'driver' => 'sqlsrv', 78 | 'host' => env('DB_HOST', 'localhost'), 79 | 'port' => env('DB_PORT', '1433'), 80 | 'database' => env('DB_DATABASE', 'forge'), 81 | 'username' => env('DB_USERNAME', 'forge'), 82 | 'password' => env('DB_PASSWORD', ''), 83 | 'charset' => 'utf8', 84 | 'prefix' => '', 85 | 'prefix_indexes' => true, 86 | ], 87 | 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Migration Repository Table 93 | |-------------------------------------------------------------------------- 94 | | 95 | | This table keeps track of all the migrations that have already run for 96 | | your application. Using this information, we can determine which of 97 | | the migrations on disk haven't actually been run in the database. 98 | | 99 | */ 100 | 101 | 'migrations' => 'migrations', 102 | 103 | /* 104 | |-------------------------------------------------------------------------- 105 | | Redis Databases 106 | |-------------------------------------------------------------------------- 107 | | 108 | | Redis is an open source, fast, and advanced key-value store that also 109 | | provides a richer body of commands than a typical key-value system 110 | | such as APC or Memcached. Laravel makes it easy to dig right in. 111 | | 112 | */ 113 | 114 | 'redis' => [ 115 | 116 | 'client' => env('REDIS_CLIENT', 'predis'), 117 | 118 | 'options' => [ 119 | 'cluster' => env('REDIS_CLUSTER', 'predis'), 120 | ], 121 | 122 | 'default' => [ 123 | 'host' => env('REDIS_HOST', '127.0.0.1'), 124 | 'password' => env('REDIS_PASSWORD', null), 125 | 'port' => env('REDIS_PORT', 6379), 126 | 'database' => env('REDIS_DB', 0), 127 | ], 128 | 129 | 'cache' => [ 130 | 'host' => env('REDIS_HOST', '127.0.0.1'), 131 | 'password' => env('REDIS_PASSWORD', null), 132 | 'port' => env('REDIS_PORT', 6379), 133 | 'database' => env('REDIS_CACHE_DB', 1), 134 | ], 135 | 136 | ], 137 | 138 | ]; 139 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | ], 66 | 67 | ], 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/jsvalidation.php: -------------------------------------------------------------------------------- 1 | 'jsvalidation::bootstrap', 11 | 12 | /* 13 | * Default JQuery selector find the form to be validated. 14 | * By default, the validations are applied to all forms. 15 | */ 16 | 'form_selector' => 'form', 17 | 18 | /* 19 | * If you change the focus on detect some error then active 20 | * this parameter to move the focus to the first error found. 21 | */ 22 | 'focus_on_error' => false, 23 | 24 | /* 25 | * Duration time for the animation when We are moving the focus 26 | * to the first error, http://api.jquery.com/animate/ for more information. 27 | */ 28 | 'duration_animate' => 1000, 29 | 30 | /* 31 | * Enable or disable Ajax validations of Database and custom rules. 32 | * By default Unique, ActiveURL, Exists and custom validations are validated via AJAX 33 | */ 34 | 'disable_remote_validation' => false, 35 | 36 | /* 37 | * Field name used in the remote validation Ajax request 38 | * You can change this value to avoid conflicts wth your field names 39 | */ 40 | 'remote_validation_field' => '_jsvalidation', 41 | 42 | ]; 43 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Log Channels 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the log channels for your application. Out of 27 | | the box, Laravel uses the Monolog PHP logging library. This gives 28 | | you a variety of powerful log handlers / formatters to utilize. 29 | | 30 | | Available Drivers: "single", "daily", "slack", "syslog", 31 | | "errorlog", "monolog", 32 | | "custom", "stack" 33 | | 34 | */ 35 | 36 | 'channels' => [ 37 | 'stack' => [ 38 | 'driver' => 'stack', 39 | 'channels' => ['daily'], 40 | 'ignore_exceptions' => false, 41 | ], 42 | 43 | 'single' => [ 44 | 'driver' => 'single', 45 | 'path' => storage_path('logs/laravel.log'), 46 | 'level' => 'debug', 47 | ], 48 | 49 | 'daily' => [ 50 | 'driver' => 'daily', 51 | 'path' => storage_path('logs/laravel.log'), 52 | 'level' => 'debug', 53 | 'days' => 14, 54 | ], 55 | 56 | 'slack' => [ 57 | 'driver' => 'slack', 58 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 59 | 'username' => 'Laravel Log', 60 | 'emoji' => ':boom:', 61 | 'level' => 'critical', 62 | ], 63 | 64 | 'papertrail' => [ 65 | 'driver' => 'monolog', 66 | 'level' => 'debug', 67 | 'handler' => SyslogUdpHandler::class, 68 | 'handler_with' => [ 69 | 'host' => env('PAPERTRAIL_URL'), 70 | 'port' => env('PAPERTRAIL_PORT'), 71 | ], 72 | ], 73 | 74 | 'stderr' => [ 75 | 'driver' => 'monolog', 76 | 'handler' => StreamHandler::class, 77 | 'formatter' => env('LOG_STDERR_FORMATTER'), 78 | 'with' => [ 79 | 'stream' => 'php://stderr', 80 | ], 81 | ], 82 | 83 | 'syslog' => [ 84 | 'driver' => 'syslog', 85 | 'level' => 'debug', 86 | ], 87 | 88 | 'errorlog' => [ 89 | 'driver' => 'errorlog', 90 | 'level' => 'debug', 91 | ], 92 | ], 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | 'queue' => env('REDIS_QUEUE', 'default'), 65 | 'retry_after' => 90, 66 | 'block_for' => null, 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Failed Queue Jobs 74 | |-------------------------------------------------------------------------- 75 | | 76 | | These options configure the behavior of failed queue job logging so you 77 | | can control which database and table are used to store the jobs that 78 | | have failed. You may change them to any database / table you wish. 79 | | 80 | */ 81 | 82 | 'failed' => [ 83 | 'database' => env('DB_CONNECTION', 'mysql'), 84 | 'table' => 'failed_jobs', 85 | ], 86 | 87 | ]; 88 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | 'sparkpost' => [ 34 | 'secret' => env('SPARKPOST_SECRET'), 35 | ], 36 | 37 | 'stripe' => [ 38 | 'model' => App\User::class, 39 | 'key' => env('STRIPE_KEY'), 40 | 'secret' => env('STRIPE_SECRET'), 41 | 'webhook' => [ 42 | 'secret' => env('STRIPE_WEBHOOK_SECRET'), 43 | 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), 44 | ], 45 | ], 46 | 47 | ]; 48 | -------------------------------------------------------------------------------- /config/snappy.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'enabled' => true, 8 | 'binary' => '/usr/local/bin/wkhtmltopdf', 9 | 'timeout' => false, 10 | 'options' => array(), 11 | 'env' => array(), 12 | ), 13 | 'image' => array( 14 | 'enabled' => true, 15 | 'binary' => '/usr/local/bin/wkhtmltoimage-amd64', 16 | 'timeout' => false, 17 | 'options' => array(), 18 | 'env' => array(), 19 | ), 20 | 21 | 22 | ); 23 | -------------------------------------------------------------------------------- /config/ui.php: -------------------------------------------------------------------------------- 1 | [ 16 | 'page_size' => 10, 17 | 'title' => env('PAGE_TITLE', '') 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Configuraciones visuales para la parte publica. 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'public' => [ 32 | 'page_size' => 6, 33 | 'default_limit' => 3, 34 | 'principal_news_limit' => 3, 35 | 'secondary_news_limit' => 6 36 | ] 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 19 | return [ 20 | 'name' => $faker->name, 21 | 'email' => $faker->unique()->safeEmail, 22 | 'email_verified_at' => now(), 23 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 24 | 'remember_token' => Str::random(10), 25 | ]; 26 | }); 27 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('rut'); 19 | $table->string('first_name')->nullable(); 20 | $table->string('last_name')->nullable(); 21 | $table->string('father_surname')->nullable(); 22 | $table->string('mother_surname')->nullable(); 23 | $table->string('email')->unique(); 24 | $table->boolean('access_web')->default(0); 25 | $table->boolean('access_app')->default(0); 26 | $table->boolean('hidden')->default(0); 27 | $table->string('password'); 28 | $table->dateTime('last_login')->nullable(); 29 | $table->rememberToken(); 30 | $table->timestamps(); 31 | 32 | }); 33 | } 34 | 35 | /** 36 | * Reverse the migrations. 37 | * 38 | * @return void 39 | */ 40 | public function down() 41 | { 42 | Schema::dropIfExists('users'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /database/migrations/2019_05_08_0000012_create_permission_tables.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name', 100); 18 | $table->string('display_name', 150); 19 | $table->string('description', 250)->nullable(); 20 | $table->string('guard_name', 10)->default('web'); 21 | $table->timestamps(); 22 | }); 23 | Schema::create($tableNames['roles'], function (Blueprint $table) { 24 | $table->increments('id'); 25 | $table->string('name',100); 26 | $table->string('display_name',150); 27 | $table->string('description',250)->nullable(); 28 | $table->boolean('hidden')->default(0); 29 | $table->string('guard_name',10)->default('web'); 30 | $table->timestamps(); 31 | }); 32 | Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames) { 33 | $table->integer('permission_id')->unsigned(); 34 | $table->string('model_type',100); 35 | $table->integer('model_id'); 36 | $table->foreign('permission_id') 37 | ->references('id') 38 | ->on($tableNames['permissions']) 39 | ->onDelete('cascade'); 40 | $table->primary(['permission_id', 'model_id', 'model_type']); 41 | }); 42 | Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames) { 43 | $table->integer('role_id')->unsigned(); 44 | $table->string('model_type',100); 45 | $table->integer('model_id'); 46 | $table->foreign('role_id') 47 | ->references('id') 48 | ->on($tableNames['roles']) 49 | ->onDelete('cascade'); 50 | $table->primary(['role_id', 'model_id', 'model_type']); 51 | }); 52 | Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { 53 | $table->integer('permission_id')->unsigned(); 54 | $table->integer('role_id')->unsigned(); 55 | $table->foreign('permission_id') 56 | ->references('id') 57 | ->on($tableNames['permissions']) 58 | ->onDelete('cascade'); 59 | $table->foreign('role_id') 60 | ->references('id') 61 | ->on($tableNames['roles']) 62 | ->onDelete('cascade'); 63 | $table->primary(['permission_id', 'role_id']); 64 | app('cache')->forget('spatie.permission.cache'); 65 | }); 66 | } 67 | /** 68 | * Reverse the migrations. 69 | * 70 | * @return void 71 | */ 72 | public function down() 73 | { 74 | $tableNames = config('permission.table_names'); 75 | Schema::dropIfExists($tableNames['role_has_permissions']); 76 | Schema::dropIfExists($tableNames['model_has_roles']); 77 | Schema::dropIfExists($tableNames['model_has_permissions']); 78 | Schema::dropIfExists($tableNames['roles']); 79 | Schema::dropIfExists($tableNames['permissions']); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 20 | DB::table('model_has_roles')->truncate(); 21 | DB::table('model_has_permissions')->truncate(); 22 | DB::table('permissions')->truncate(); 23 | DB::table('roles')->truncate(); 24 | DB::table('users')->truncate(); 25 | 26 | Schema::enableForeignKeyConstraints(); 27 | 28 | $this->call(PermissionsTableSeeder::class); 29 | 30 | $this->call(RolesTableSeeder::class); 31 | 32 | $this->call(UsersTableSeeder::class); 33 | 34 | Model::reguard(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeds/PermissionsTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Ver Sección Control de Acceso'], // 18 | ['display_name' => 'Listar Usuarios'], // 19 | ['display_name' => 'Crear Usuarios'], // 20 | ['display_name' => 'Editar Usuarios'], // 21 | ['display_name' => 'Eliminar Usuarios'], // 22 | ['display_name' => 'Listar Roles'], // 23 | ['display_name' => 'Crear Roles'], // 24 | ['display_name' => 'Editar Roles'], // 25 | ['display_name' => 'Eliminar Roles'], // 26 | ['display_name' => 'Listar Permisos'], // 27 | ['display_name' => 'Crear Permisos'], // 28 | ['display_name' => 'Editar Permisos'], // 29 | ['display_name' => 'Eliminar Permisos'], // 30 | ]; 31 | 32 | 33 | foreach ($permisos as $item){ 34 | Permission::create([ 35 | 'display_name' => $item['display_name'], 36 | 'name' => str_slug($item['display_name']) 37 | ]); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/seeds/RolesTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Super Administrador', 18 | 'hidden' => true, 19 | 'permissions' => [1,2,3,4,5,6,7,8,9,10,11,12,13] 20 | ], 21 | [ 22 | 'display_name' => 'Administrador', 23 | 'hidden' => false, 24 | 'permissions' => [1,2,3,4,5,6,7,8,9,10,11,12,13] 25 | ] 26 | ]; 27 | 28 | foreach ($roles as $item){ 29 | $role = Role::create([ 30 | 'display_name' => $item['display_name'], 31 | 'name' => str_slug($item['display_name']), 32 | 'hidden' => $item['hidden'] 33 | ]); 34 | 35 | $permissions = Permission::whereIn('id',$item['permissions'])->get(); 36 | $role->syncPermissions($permissions); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | '1-9', 18 | 'first_name' => 'Hola', 19 | 'last_name' => 'Mundo', 20 | 'father_surname' => 'Real', 21 | 'mother_surname' => 'Desarrolladores', 22 | 'email' => 'hola@mundo.com', 23 | 'access_web' => true, 24 | 'access_app' => true, 25 | 'password' => 'holamundo', 26 | 'hidden' => true, 27 | 'role' => 'super-administrador' 28 | ] 29 | 30 | ]; 31 | 32 | foreach ($users as $item){ 33 | 34 | $user = User::create([ 35 | 'rut' => $item['rut'], 36 | 'first_name' => $item['first_name'], 37 | 'last_name' => $item['last_name'], 38 | 'father_surname' => $item['father_surname'], 39 | 'mother_surname' => $item['mother_surname'], 40 | 'email' => $item['email'], 41 | 'access_web' => $item['access_web'], 42 | 'access_app' => $item['access_app'], 43 | 'password' => $item['password'], 44 | 'hidden' => $item['hidden'] 45 | ]); 46 | 47 | $user->assignRole($item['role']); 48 | 49 | } 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.18.1", 14 | "bootstrap": "^4.0.0", 15 | "cross-env": "^5.2.0", 16 | "jquery": "^3.2", 17 | "laravel-mix": "^4.0.16", 18 | "lodash": "^4.17.13", 19 | "popper.js": "^1.12", 20 | "resolve-url-loader": "^2.3.1", 21 | "sass": "^1.21.0", 22 | "sass-loader": "^7.1.0", 23 | "vue-template-compiler": "^2.6.10" 24 | }, 25 | "dependencies": { 26 | "@ckeditor/ckeditor5-build-classic": "^12.2.0", 27 | "@ckeditor/ckeditor5-build-decoupled-document": "^12.2.0", 28 | "@fortawesome/fontawesome-free": "^5.9.0", 29 | "datatables.net": "^1.10.12", 30 | "datatables.net-bs": "^1.10.12", 31 | "datatables.net-responsive": "^2.1.0", 32 | "datatables.net-responsive-bs": "^2.1.0", 33 | "daterangepicker": "^3.0.3", 34 | "moment": "^2.24.0", 35 | "select2": "^4.0.6-rc.1", 36 | "select2-bootstrap-theme": "0.1.0-beta.10", 37 | "sweetalert2": "^8.12.2", 38 | "switchery": "0.0.2" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Unit 14 | 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/fonts/classycb9b.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/classycb9b.eot -------------------------------------------------------------------------------- /resources/fonts/classycb9b.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/fonts/classycb9b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/classycb9b.ttf -------------------------------------------------------------------------------- /resources/fonts/classycb9b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/classycb9b.woff -------------------------------------------------------------------------------- /resources/fonts/cryptocoins.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/cryptocoins.ttf -------------------------------------------------------------------------------- /resources/fonts/cryptocoins.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/cryptocoins.woff -------------------------------------------------------------------------------- /resources/fonts/cryptocoins.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/cryptocoins.woff2 -------------------------------------------------------------------------------- /resources/fonts/flaticon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/flaticon.woff -------------------------------------------------------------------------------- /resources/fonts/fontawesome-webfont3e6e.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/fontawesome-webfont3e6e.eot -------------------------------------------------------------------------------- /resources/fonts/fontawesome-webfont3e6e.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/fontawesome-webfont3e6e.ttf -------------------------------------------------------------------------------- /resources/fonts/fontawesome-webfont3e6e.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/fontawesome-webfont3e6e.woff -------------------------------------------------------------------------------- /resources/fonts/fontawesome-webfont3e6e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/fontawesome-webfont3e6e.woff2 -------------------------------------------------------------------------------- /resources/fonts/fontawesome-webfontd41d.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/fontawesome-webfontd41d.eot -------------------------------------------------------------------------------- /resources/fonts/themify9f24.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/themify9f24.eot -------------------------------------------------------------------------------- /resources/fonts/themify9f24.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/themify9f24.ttf -------------------------------------------------------------------------------- /resources/fonts/themify9f24.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/themify9f24.woff -------------------------------------------------------------------------------- /resources/fonts/themifyd41d.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/themifyd41d.eot -------------------------------------------------------------------------------- /resources/fonts/ui-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/fonts/ui-icons.woff2 -------------------------------------------------------------------------------- /resources/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diruzcode/laravel-admin-template/0687cb0cfb2fe6e965932d39c0bdf9ac313385da/resources/img/logo.png -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.Popper = require('popper.js').default; 12 | window.$ = window.jQuery = require('jquery'); 13 | 14 | require('bootstrap'); 15 | } catch (e) {} 16 | 17 | /** 18 | * We'll load the axios HTTP library which allows us to easily issue requests 19 | * to our Laravel back-end. This library automatically handles sending the 20 | * CSRF token as a header based on the value of the "XSRF" token cookie. 21 | */ 22 | 23 | window.axios = require('axios'); 24 | 25 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 26 | 27 | /** 28 | * Next we will register the CSRF Token as a common header with Axios so that 29 | * all outgoing HTTP requests automatically have it attached. This is just 30 | * a simple convenience so we don't have to attach every token manually. 31 | */ 32 | 33 | let token = document.head.querySelector('meta[name="csrf-token"]'); 34 | 35 | if (token) { 36 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 37 | } else { 38 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 39 | } 40 | 41 | /** 42 | * Echo exposes an expressive API for subscribing to channels and listening 43 | * for events that are broadcast by Laravel. Echo and event broadcasting 44 | * allows your team to easily build robust real-time web applications. 45 | */ 46 | 47 | // import Echo from 'laravel-echo' 48 | 49 | // window.Pusher = require('pusher-js'); 50 | 51 | // window.Echo = new Echo({ 52 | // broadcaster: 'pusher', 53 | // key: process.env.MIX_PUSHER_APP_KEY, 54 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 55 | // encrypted: true 56 | // }); 57 | -------------------------------------------------------------------------------- /resources/js/dashboard/app.js: -------------------------------------------------------------------------------- 1 | require('../bootstrap'); 2 | 3 | 4 | (function($) { 5 | "use strict"; // Start of use strict 6 | 7 | // Toggle the side navigation 8 | $("#sidebarToggle, #sidebarToggleTop").on('click', function(e) { 9 | $("body").toggleClass("sidebar-toggled"); 10 | $(".sidebar").toggleClass("toggled"); 11 | if ($(".sidebar").hasClass("toggled")) { 12 | $('.sidebar .collapse').collapse('hide'); 13 | }; 14 | }); 15 | 16 | // Close any open menu accordions when window is resized below 768px 17 | $(window).resize(function() { 18 | if ($(window).width() < 768) { 19 | $('.sidebar .collapse').collapse('hide'); 20 | }; 21 | }); 22 | 23 | // Prevent the content wrapper from scrolling when the fixed side navigation hovered over 24 | $('body.fixed-nav .sidebar').on('mousewheel DOMMouseScroll wheel', function(e) { 25 | if ($(window).width() > 768) { 26 | var e0 = e.originalEvent, 27 | delta = e0.wheelDelta || -e0.detail; 28 | this.scrollTop += (delta < 0 ? 1 : -1) * 30; 29 | e.preventDefault(); 30 | } 31 | }); 32 | 33 | // Scroll to top button appear 34 | $(document).on('scroll', function() { 35 | var scrollDistance = $(this).scrollTop(); 36 | if (scrollDistance > 100) { 37 | $('.scroll-to-top').fadeIn(); 38 | } else { 39 | $('.scroll-to-top').fadeOut(); 40 | } 41 | }); 42 | 43 | // Smooth scrolling using jQuery easing 44 | $(document).on('click', 'a.scroll-to-top', function(e) { 45 | var $anchor = $(this); 46 | $('html, body').stop().animate({ 47 | scrollTop: ($($anchor.attr('href')).offset().top) 48 | }, 1000, 'easeInOutExpo'); 49 | e.preventDefault(); 50 | }); 51 | 52 | })(jQuery); // End of use strict 53 | -------------------------------------------------------------------------------- /resources/js/dashboard/demo/chart-area-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#858796'; 4 | 5 | function number_format(number, decimals, dec_point, thousands_sep) { 6 | // * example: number_format(1234.56, 2, ',', ' '); 7 | // * return: '1 234,56' 8 | number = (number + '').replace(',', '').replace(' ', ''); 9 | var n = !isFinite(+number) ? 0 : +number, 10 | prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), 11 | sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, 12 | dec = (typeof dec_point === 'undefined') ? '.' : dec_point, 13 | s = '', 14 | toFixedFix = function(n, prec) { 15 | var k = Math.pow(10, prec); 16 | return '' + Math.round(n * k) / k; 17 | }; 18 | // Fix for IE parseFloat(0.55).toFixed(0) = 0; 19 | s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); 20 | if (s[0].length > 3) { 21 | s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); 22 | } 23 | if ((s[1] || '').length < prec) { 24 | s[1] = s[1] || ''; 25 | s[1] += new Array(prec - s[1].length + 1).join('0'); 26 | } 27 | return s.join(dec); 28 | } 29 | 30 | // Area Chart Example 31 | var ctx = document.getElementById("myAreaChart"); 32 | var myLineChart = new Chart(ctx, { 33 | type: 'line', 34 | data: { 35 | labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 36 | datasets: [{ 37 | label: "Earnings", 38 | lineTension: 0.3, 39 | backgroundColor: "rgba(78, 115, 223, 0.05)", 40 | borderColor: "rgba(78, 115, 223, 1)", 41 | pointRadius: 3, 42 | pointBackgroundColor: "rgba(78, 115, 223, 1)", 43 | pointBorderColor: "rgba(78, 115, 223, 1)", 44 | pointHoverRadius: 3, 45 | pointHoverBackgroundColor: "rgba(78, 115, 223, 1)", 46 | pointHoverBorderColor: "rgba(78, 115, 223, 1)", 47 | pointHitRadius: 10, 48 | pointBorderWidth: 2, 49 | data: [0, 10000, 5000, 15000, 10000, 20000, 15000, 25000, 20000, 30000, 25000, 40000], 50 | }], 51 | }, 52 | options: { 53 | maintainAspectRatio: false, 54 | layout: { 55 | padding: { 56 | left: 10, 57 | right: 25, 58 | top: 25, 59 | bottom: 0 60 | } 61 | }, 62 | scales: { 63 | xAxes: [{ 64 | time: { 65 | unit: 'date' 66 | }, 67 | gridLines: { 68 | display: false, 69 | drawBorder: false 70 | }, 71 | ticks: { 72 | maxTicksLimit: 7 73 | } 74 | }], 75 | yAxes: [{ 76 | ticks: { 77 | maxTicksLimit: 5, 78 | padding: 10, 79 | // Include a dollar sign in the ticks 80 | callback: function(value, index, values) { 81 | return '$' + number_format(value); 82 | } 83 | }, 84 | gridLines: { 85 | color: "rgb(234, 236, 244)", 86 | zeroLineColor: "rgb(234, 236, 244)", 87 | drawBorder: false, 88 | borderDash: [2], 89 | zeroLineBorderDash: [2] 90 | } 91 | }], 92 | }, 93 | legend: { 94 | display: false 95 | }, 96 | tooltips: { 97 | backgroundColor: "rgb(255,255,255)", 98 | bodyFontColor: "#858796", 99 | titleMarginBottom: 10, 100 | titleFontColor: '#6e707e', 101 | titleFontSize: 14, 102 | borderColor: '#dddfeb', 103 | borderWidth: 1, 104 | xPadding: 15, 105 | yPadding: 15, 106 | displayColors: false, 107 | intersect: false, 108 | mode: 'index', 109 | caretPadding: 10, 110 | callbacks: { 111 | label: function(tooltipItem, chart) { 112 | var datasetLabel = chart.datasets[tooltipItem.datasetIndex].label || ''; 113 | return datasetLabel + ': $' + number_format(tooltipItem.yLabel); 114 | } 115 | } 116 | } 117 | } 118 | }); 119 | -------------------------------------------------------------------------------- /resources/js/dashboard/demo/chart-bar-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#858796'; 4 | 5 | function number_format(number, decimals, dec_point, thousands_sep) { 6 | // * example: number_format(1234.56, 2, ',', ' '); 7 | // * return: '1 234,56' 8 | number = (number + '').replace(',', '').replace(' ', ''); 9 | var n = !isFinite(+number) ? 0 : +number, 10 | prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), 11 | sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, 12 | dec = (typeof dec_point === 'undefined') ? '.' : dec_point, 13 | s = '', 14 | toFixedFix = function(n, prec) { 15 | var k = Math.pow(10, prec); 16 | return '' + Math.round(n * k) / k; 17 | }; 18 | // Fix for IE parseFloat(0.55).toFixed(0) = 0; 19 | s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); 20 | if (s[0].length > 3) { 21 | s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); 22 | } 23 | if ((s[1] || '').length < prec) { 24 | s[1] = s[1] || ''; 25 | s[1] += new Array(prec - s[1].length + 1).join('0'); 26 | } 27 | return s.join(dec); 28 | } 29 | 30 | // Bar Chart Example 31 | var ctx = document.getElementById("myBarChart"); 32 | var myBarChart = new Chart(ctx, { 33 | type: 'bar', 34 | data: { 35 | labels: ["January", "February", "March", "April", "May", "June"], 36 | datasets: [{ 37 | label: "Revenue", 38 | backgroundColor: "#4e73df", 39 | hoverBackgroundColor: "#2e59d9", 40 | borderColor: "#4e73df", 41 | data: [4215, 5312, 6251, 7841, 9821, 14984], 42 | }], 43 | }, 44 | options: { 45 | maintainAspectRatio: false, 46 | layout: { 47 | padding: { 48 | left: 10, 49 | right: 25, 50 | top: 25, 51 | bottom: 0 52 | } 53 | }, 54 | scales: { 55 | xAxes: [{ 56 | time: { 57 | unit: 'month' 58 | }, 59 | gridLines: { 60 | display: false, 61 | drawBorder: false 62 | }, 63 | ticks: { 64 | maxTicksLimit: 6 65 | }, 66 | maxBarThickness: 25, 67 | }], 68 | yAxes: [{ 69 | ticks: { 70 | min: 0, 71 | max: 15000, 72 | maxTicksLimit: 5, 73 | padding: 10, 74 | // Include a dollar sign in the ticks 75 | callback: function(value, index, values) { 76 | return '$' + number_format(value); 77 | } 78 | }, 79 | gridLines: { 80 | color: "rgb(234, 236, 244)", 81 | zeroLineColor: "rgb(234, 236, 244)", 82 | drawBorder: false, 83 | borderDash: [2], 84 | zeroLineBorderDash: [2] 85 | } 86 | }], 87 | }, 88 | legend: { 89 | display: false 90 | }, 91 | tooltips: { 92 | titleMarginBottom: 10, 93 | titleFontColor: '#6e707e', 94 | titleFontSize: 14, 95 | backgroundColor: "rgb(255,255,255)", 96 | bodyFontColor: "#858796", 97 | borderColor: '#dddfeb', 98 | borderWidth: 1, 99 | xPadding: 15, 100 | yPadding: 15, 101 | displayColors: false, 102 | caretPadding: 10, 103 | callbacks: { 104 | label: function(tooltipItem, chart) { 105 | var datasetLabel = chart.datasets[tooltipItem.datasetIndex].label || ''; 106 | return datasetLabel + ': $' + number_format(tooltipItem.yLabel); 107 | } 108 | } 109 | }, 110 | } 111 | }); 112 | -------------------------------------------------------------------------------- /resources/js/dashboard/demo/chart-pie-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#858796'; 4 | 5 | // Pie Chart Example 6 | var ctx = document.getElementById("myPieChart"); 7 | var myPieChart = new Chart(ctx, { 8 | type: 'doughnut', 9 | data: { 10 | labels: ["Direct", "Referral", "Social"], 11 | datasets: [{ 12 | data: [55, 30, 15], 13 | backgroundColor: ['#4e73df', '#1cc88a', '#36b9cc'], 14 | hoverBackgroundColor: ['#2e59d9', '#17a673', '#2c9faf'], 15 | hoverBorderColor: "rgba(234, 236, 244, 1)", 16 | }], 17 | }, 18 | options: { 19 | maintainAspectRatio: false, 20 | tooltips: { 21 | backgroundColor: "rgb(255,255,255)", 22 | bodyFontColor: "#858796", 23 | borderColor: '#dddfeb', 24 | borderWidth: 1, 25 | xPadding: 15, 26 | yPadding: 15, 27 | displayColors: false, 28 | caretPadding: 10, 29 | }, 30 | legend: { 31 | display: false 32 | }, 33 | cutoutPercentage: 80, 34 | }, 35 | }); 36 | -------------------------------------------------------------------------------- /resources/js/dashboard/demo/datatables-demo.js: -------------------------------------------------------------------------------- 1 | // Call the dataTables jQuery plugin 2 | $(document).ready(function() { 3 | $('#dataTable').DataTable(); 4 | }); 5 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least eight characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/es_CL.UTF-8/auth.php: -------------------------------------------------------------------------------- 1 | 'Las credenciales no concuerdan con nuestros registros.', 17 | 'throttle' => 'Demasiados intentos de ingreso. Por favor intente nuevamente en :seconds segundos.', 18 | 'access_web' => 'La cuenta no tiene acceso a la web, favor contactar al administrador.', 19 | 'access_app' => 'La cuenta no tiene acceso a la aplicación, favor contactar al administrador.', 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /resources/lang/es_CL.UTF-8/pagination.php: -------------------------------------------------------------------------------- 1 | '« Anterior', 17 | 'next' => 'Siguiente »', 18 | 19 | ]; -------------------------------------------------------------------------------- /resources/lang/es_CL.UTF-8/passwords.php: -------------------------------------------------------------------------------- 1 | 'La contraseña debe tener al menos 6 caracteres y coincidir con la confirmación.', 17 | 'reset' => '¡Su contraseña ha sido restablecida!', 18 | 'sent' => '¡Hemos enviado un email con el link para restablecer tu contraseña!', 19 | 'token' => 'Este token de re-establecimiento de contraseña es inválido.', 20 | 'user' => "No podemos encontrar un usuario con el email indicado.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn-circle { 2 | border-radius: 100%; 3 | height: 2.5rem; 4 | width: 2.5rem; 5 | font-size: 1rem; 6 | display: inline-flex; 7 | align-items: center; 8 | justify-content: center; 9 | &.btn-sm { 10 | height: 1.8rem; 11 | width: 1.8rem; 12 | font-size: 0.75rem; 13 | } 14 | &.btn-lg { 15 | height: 3.5rem; 16 | width: 3.5rem; 17 | font-size: 1.35rem; 18 | } 19 | } 20 | 21 | .btn-icon-split { 22 | padding: 0; 23 | overflow: hidden; 24 | display: inline-flex; 25 | align-items: stretch; 26 | justify-content: center; 27 | .icon { 28 | background: fade-out($black, .85); 29 | display: inline-block; 30 | padding: $btn-padding-y $btn-padding-x; 31 | } 32 | .text { 33 | display: inline-block; 34 | padding: $btn-padding-y $btn-padding-x; 35 | } 36 | &.btn-sm { 37 | .icon { 38 | padding: $btn-padding-y-sm $btn-padding-x-sm; 39 | } 40 | .text { 41 | padding: $btn-padding-y-sm $btn-padding-x-sm; 42 | } 43 | } 44 | &.btn-lg { 45 | .icon { 46 | padding: $btn-padding-y-lg $btn-padding-x-lg; 47 | } 48 | .text { 49 | padding: $btn-padding-y-lg $btn-padding-x-lg; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_cards.scss: -------------------------------------------------------------------------------- 1 | // Custom Card Styling 2 | 3 | .card { 4 | .card-header { 5 | // Format Dropdowns in Card Headings 6 | .dropdown { 7 | line-height: 1; 8 | .dropdown-menu { 9 | line-height: 1.5; 10 | } 11 | } 12 | } 13 | // Collapsable Card Styling 14 | .card-header[data-toggle="collapse"] { 15 | text-decoration: none; 16 | position: relative; 17 | padding: 0.75rem 3.25rem 0.75rem 1.25rem; 18 | &::after { 19 | position: absolute; 20 | right: 0; 21 | top: 0; 22 | padding-right: 1.725rem; 23 | line-height: 51px; 24 | font-weight: 900; 25 | content: '\f107'; 26 | font-family: 'Font Awesome 5 Free'; 27 | color: $gray-400; 28 | } 29 | &.collapsed { 30 | border-radius: $card-border-radius; 31 | &::after { 32 | content: '\f105'; 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_charts.scss: -------------------------------------------------------------------------------- 1 | // Area Chart 2 | .chart-area { 3 | position: relative; 4 | height: 10rem; 5 | width: 100%; 6 | @include media-breakpoint-up(md) { 7 | height: 20rem; 8 | } 9 | } 10 | 11 | // Bar Chart 12 | .chart-bar { 13 | position: relative; 14 | height: 10rem; 15 | width: 100%; 16 | @include media-breakpoint-up(md) { 17 | height: 20rem; 18 | } 19 | } 20 | 21 | // Pie Chart 22 | .chart-pie { 23 | position: relative; 24 | height: 15rem; 25 | width: 100%; 26 | @include media-breakpoint-up(md) { 27 | height: calc(20rem - 43px) !important; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_dropdowns.scss: -------------------------------------------------------------------------------- 1 | // Custom Dropdown Styling 2 | 3 | .dropdown { 4 | .dropdown-menu { 5 | font-size: $dropdown-font-size; 6 | .dropdown-header { 7 | @extend .text-uppercase; 8 | font-weight: 800; 9 | font-size: 0.65rem; 10 | color: $gray-500; 11 | } 12 | } 13 | } 14 | 15 | // Utility class to hide arrow from dropdown 16 | 17 | .dropdown.no-arrow { 18 | .dropdown-toggle::after { 19 | display: none; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_error.scss: -------------------------------------------------------------------------------- 1 | // Lucas Bebber's Glitch Effect 2 | // Tutorial and CSS from CSS Tricks 3 | // https://css-tricks.com/glitch-effect-text-images-svg/ 4 | 5 | .error { 6 | color: $gray-800; 7 | font-size: 7rem; 8 | position: relative; 9 | line-height: 1; 10 | width: 12.5rem; 11 | } 12 | @keyframes noise-anim { 13 | $steps: 20; 14 | @for $i from 0 through $steps { 15 | #{percentage($i*(1/$steps))} { 16 | clip: rect(random(100)+px,9999px,random(100)+px,0); 17 | } 18 | } 19 | } 20 | .error:after { 21 | content: attr(data-text); 22 | position: absolute; 23 | left: 2px; 24 | text-shadow: -1px 0 $red; 25 | top: 0; 26 | color: $gray-800; 27 | background: $gray-100; 28 | overflow: hidden; 29 | clip: rect(0,900px,0,0); 30 | animation: noise-anim 2s infinite linear alternate-reverse; 31 | } 32 | 33 | @keyframes noise-anim-2 { 34 | $steps: 20; 35 | @for $i from 0 through $steps { 36 | #{percentage($i*(1/$steps))} { 37 | clip: rect(random(100)+px,9999px,random(100)+px,0); 38 | } 39 | } 40 | } 41 | .error:before { 42 | content: attr(data-text); 43 | position: absolute; 44 | left: -2px; 45 | text-shadow: 1px 0 $blue; 46 | top: 0; 47 | color: $gray-800; 48 | background: $gray-100; 49 | overflow: hidden; 50 | clip: rect(0,900px,0,0); 51 | animation: noise-anim-2 3s infinite linear alternate-reverse; 52 | } 53 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_footer.scss: -------------------------------------------------------------------------------- 1 | footer.sticky-footer { 2 | padding: 2rem 0; 3 | flex-shrink: 0; 4 | .copyright { 5 | line-height: 1; 6 | font-size: 0.8rem; 7 | } 8 | } 9 | 10 | body.sidebar-toggled { 11 | footer.sticky-footer { 12 | width: 100%; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_global.scss: -------------------------------------------------------------------------------- 1 | // Global component styles 2 | 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | 8 | body { 9 | height: 100%; 10 | } 11 | 12 | a { 13 | &:focus { 14 | outline: none; 15 | } 16 | } 17 | 18 | // Main page wrapper 19 | #wrapper { 20 | display: flex; 21 | #content-wrapper { 22 | background-color: $gray-100; 23 | width: 100%; 24 | overflow-x: hidden; 25 | #content { 26 | flex: 1 0 auto; 27 | } 28 | } 29 | } 30 | 31 | // Set container padding to match gutter width instead of default 15px 32 | .container, 33 | .container-fluid { 34 | padding-left: $grid-gutter-width; 35 | padding-right: $grid-gutter-width; 36 | } 37 | 38 | // Scroll to top button 39 | .scroll-to-top { 40 | position: fixed; 41 | right: 1rem; 42 | bottom: 1rem; 43 | display: none; 44 | width: 2.75rem; 45 | height: 2.75rem; 46 | text-align: center; 47 | color: $white; 48 | background: fade-out($gray-800, .5); 49 | line-height: 46px; 50 | &:focus, 51 | &:hover { 52 | color: white; 53 | } 54 | &:hover { 55 | background: $gray-800; 56 | } 57 | i { 58 | font-weight: 800; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_login.scss: -------------------------------------------------------------------------------- 1 | // Pulling these images from Unsplash 2 | // Toshi the dog from https://unsplash.com/@charlesdeluvio - what a funny dog... 3 | 4 | .bg-login-image { 5 | background: url('https://source.unsplash.com/K4mSJ7kc0As/600x800'); 6 | background-position: center; 7 | background-size: cover; 8 | } 9 | 10 | .bg-register-image { 11 | background: url('https://source.unsplash.com/Mv9hjnEUHR4/600x800'); 12 | background-position: center; 13 | background-size: cover; 14 | } 15 | 16 | .bg-password-image { 17 | background: url('https://source.unsplash.com/oWTW-jNGl9I/600x800'); 18 | background-position: center; 19 | background-size: cover; 20 | } 21 | 22 | form.user { 23 | 24 | .custom-checkbox.small { 25 | label { 26 | line-height: 1.5rem; 27 | } 28 | } 29 | 30 | .form-control-user { 31 | font-size: 0.8rem; 32 | border-radius: 10rem; 33 | padding: 1.5rem 1rem; 34 | } 35 | 36 | .btn-user { 37 | font-size: 0.8rem; 38 | border-radius: 10rem; 39 | padding: 0.75rem 1rem; 40 | } 41 | 42 | } 43 | 44 | .btn-google { 45 | @include button-variant($brand-google, $white); 46 | } 47 | 48 | .btn-facebook { 49 | @include button-variant($brand-facebook, $white); 50 | } 51 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_mixins.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_navs.scss: -------------------------------------------------------------------------------- 1 | @import "navs/global.scss"; 2 | @import "navs/topbar.scss"; 3 | @import "navs/sidebar.scss"; 4 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/animation.scss"; 2 | @import "utilities/background.scss"; 3 | @import "utilities/display.scss"; 4 | @import "utilities/text.scss"; 5 | @import "utilities/border.scss"; 6 | @import "utilities/progress.scss"; 7 | @import "utilities/rotate.scss"; 8 | -------------------------------------------------------------------------------- /resources/sass/dashboard/_variables.scss: -------------------------------------------------------------------------------- 1 | // Override Bootstrap default variables here 2 | // Do not edit any of the files in /vendor/bootstrap/scss/! 3 | 4 | // Color Variables 5 | // Bootstrap Color Overrides 6 | 7 | $white: #fff !default; 8 | $gray-100: #f8f9fc !default; 9 | $gray-200: #eaecf4 !default; 10 | $gray-300: #dddfeb !default; 11 | $gray-400: #d1d3e2 !default; 12 | $gray-500: #b7b9cc !default; 13 | $gray-600: #858796 !default; 14 | $gray-700: #6e707e !default; 15 | $gray-800: #5a5c69 !default; 16 | $gray-900: #3a3b45 !default; 17 | $black: #000 !default; 18 | 19 | $blue: #4e73df !default; 20 | $indigo: #6610f2 !default; 21 | $purple: #6f42c1 !default; 22 | $pink: #e83e8c !default; 23 | $red: #e74a3b !default; 24 | $orange: #fd7e14 !default; 25 | $yellow: #f6c23e !default; 26 | $green: #1cc88a !default; 27 | $teal: #20c9a6 !default; 28 | $cyan: #36b9cc !default; 29 | 30 | // Custom Colors 31 | $brand-google: #ea4335; 32 | $brand-facebook: #3b5998; 33 | 34 | // Set Contrast Threshold 35 | $yiq-contrasted-threshold: 195 !default; 36 | 37 | // Typography 38 | $body-color: $gray-600 !default; 39 | 40 | $font-family-sans-serif: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", 'Noto Color Emoji' !default; 41 | 42 | $font-weight-light: 300 !default; 43 | // $font-weight-base: 400; 44 | $headings-font-weight: 400 !default; 45 | 46 | // Shadows 47 | $box-shadow-sm: 0 0.125rem 0.25rem 0 rgba($gray-900, .2) !default; 48 | $box-shadow: 0 0.15rem 1.75rem 0 rgba($gray-900, .15) !default; 49 | // $box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default; 50 | 51 | // Borders Radius 52 | $border-radius: 0.35rem !default; 53 | $border-color: darken($gray-200, 2%); 54 | 55 | // Spacing Variables 56 | // Change below variable if the height of the navbar changes 57 | $topbar-base-height: 4.375rem; 58 | // Change below variable to change the width of the sidenav 59 | $sidebar-base-width: 14rem; 60 | // Change below variable to change the width of the sidenav when collapsed 61 | $sidebar-collapsed-width: 6.5rem; 62 | 63 | // Card 64 | $card-cap-bg: $gray-100; 65 | $card-border-color: $border-color; 66 | 67 | // Adjust column spacing for symmetry 68 | $spacer: 1rem; 69 | $grid-gutter-width: $spacer * 1.5; 70 | 71 | // Transitions 72 | $transition-collapse: height .15s ease !default; 73 | 74 | // Dropdowns 75 | $dropdown-font-size: 0.85rem; 76 | $dropdown-border-color: $border-color; 77 | -------------------------------------------------------------------------------- /resources/sass/dashboard/navs/_global.scss: -------------------------------------------------------------------------------- 1 | // Global styles for both custom sidebar and topbar compoments 2 | 3 | .sidebar, 4 | .topbar { 5 | .nav-item { 6 | // Customize Dropdown Arrows for Navbar 7 | &.dropdown { 8 | .dropdown-toggle { 9 | &::after { 10 | width: 1rem; 11 | text-align: center; 12 | float: right; 13 | vertical-align: 0; 14 | border: 0; 15 | font-weight: 900; 16 | content: '\f105'; 17 | font-family: 'Font Awesome 5 Free'; 18 | } 19 | } 20 | &.show { 21 | .dropdown-toggle::after { 22 | content: '\f107'; 23 | } 24 | } 25 | } 26 | // Counter for nav links and nav link image sizing 27 | .nav-link { 28 | position: relative; 29 | .badge-counter { 30 | position: absolute; 31 | transform: scale(0.7); 32 | transform-origin: top right; 33 | right: .25rem; 34 | margin-top: -.25rem; 35 | } 36 | .img-profile { 37 | height: 2rem; 38 | width: 2rem; 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /resources/sass/dashboard/navs/_topbar.scss: -------------------------------------------------------------------------------- 1 | // Topbar 2 | .topbar { 3 | height: $topbar-base-height; 4 | #sidebarToggleTop { 5 | height: 2.5rem; 6 | width: 2.5rem; 7 | &:hover { 8 | background-color: $gray-200; 9 | } 10 | &:active { 11 | background-color: $gray-300; 12 | } 13 | } 14 | .navbar-search { 15 | width: 25rem; 16 | input { 17 | font-size: 0.85rem; 18 | } 19 | } 20 | .topbar-divider { 21 | width: 0; 22 | border-right: 1px solid $border-color; 23 | height: calc(#{$topbar-base-height} - 2rem); 24 | margin: auto 1rem; 25 | } 26 | .nav-item { 27 | .nav-link { 28 | height: $topbar-base-height; 29 | display: flex; 30 | align-items: center; 31 | padding: 0 0.75rem; 32 | &:focus { 33 | outline: none; 34 | } 35 | } 36 | &:focus { 37 | outline: none; 38 | } 39 | } 40 | .dropdown { 41 | position: static; 42 | .dropdown-menu { 43 | width: calc(100% - #{$grid-gutter-width}); 44 | right: $grid-gutter-width / 2; 45 | } 46 | } 47 | .dropdown-list { 48 | padding: 0; 49 | border: none; 50 | overflow: hidden; 51 | .dropdown-header { 52 | background-color: $primary; 53 | border: 1px solid $primary; 54 | padding-top: 0.75rem; 55 | padding-bottom: 0.75rem; 56 | color: $white; 57 | } 58 | .dropdown-item { 59 | white-space: normal; 60 | padding-top: 0.5rem; 61 | padding-bottom: 0.5rem; 62 | border-left: 1px solid $border-color; 63 | border-right: 1px solid $border-color; 64 | border-bottom: 1px solid $border-color; 65 | line-height: 1.3rem; 66 | .dropdown-list-image { 67 | position: relative; 68 | height: 2.5rem; 69 | width: 2.5rem; 70 | img { 71 | height: 2.5rem; 72 | width: 2.5rem; 73 | } 74 | .status-indicator { 75 | background-color: $gray-200; 76 | height: 0.75rem; 77 | width: 0.75rem; 78 | border-radius: 100%; 79 | position: absolute; 80 | bottom: 0; 81 | right: 0; 82 | border: .125rem solid $white; 83 | } 84 | } 85 | .text-truncate { 86 | max-width: 10rem; 87 | } 88 | &:active { 89 | background-color: $gray-200; 90 | color: $gray-900; 91 | } 92 | } 93 | } 94 | @include media-breakpoint-up(sm) { 95 | .dropdown { 96 | position: relative; 97 | .dropdown-menu { 98 | width: auto; 99 | right: 0; 100 | } 101 | } 102 | .dropdown-list { 103 | width: 20rem !important; 104 | .dropdown-item { 105 | .text-truncate { 106 | max-width: 13.375rem; 107 | } 108 | } 109 | } 110 | } 111 | } 112 | 113 | .topbar.navbar-dark {} 114 | 115 | .topbar.navbar-light { 116 | .navbar-nav { 117 | .nav-item { 118 | .nav-link { 119 | color: $gray-400; 120 | &:hover { 121 | color: $gray-500; 122 | } 123 | &:active { 124 | color: $gray-600; 125 | } 126 | } 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_animation.scss: -------------------------------------------------------------------------------- 1 | // Animation Utilities 2 | 3 | // Grow In Animation 4 | 5 | @keyframes growIn { 6 | 0% { 7 | transform: scale(0.9); 8 | opacity: 0; 9 | } 10 | 100% { 11 | transform: scale(1); 12 | opacity: 1; 13 | } 14 | } 15 | 16 | .animated--grow-in { 17 | animation-name: growIn; 18 | animation-duration: 200ms; 19 | animation-timing-function: transform cubic-bezier(.18,1.25,.4,1), opacity cubic-bezier(0,1,.4,1); 20 | } 21 | 22 | // Fade In Animation 23 | 24 | @keyframes fadeIn { 25 | 0% { 26 | opacity: 0; 27 | } 28 | 100% { 29 | opacity: 1; 30 | } 31 | } 32 | 33 | .animated--fade-in { 34 | animation-name: fadeIn; 35 | animation-duration: 200ms; 36 | animation-timing-function: opacity cubic-bezier(0,1,.4,1); 37 | } 38 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // Background Gradient Utilities 2 | 3 | @each $color, $value in $theme-colors { 4 | .bg-gradient-#{$color} { 5 | background-color: $value; 6 | background-image: linear-gradient(180deg, $value 10%, darken($value, 15%) 100%); 7 | background-size: cover; 8 | } 9 | } 10 | 11 | // Grayscale Background Utilities 12 | 13 | @each $level, $value in $grays { 14 | .bg-gray-#{$level} { 15 | background-color: $value !important; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_border.scss: -------------------------------------------------------------------------------- 1 | @each $color, $value in $theme-colors { 2 | @each $position in ['left', 'bottom'] { 3 | .border-#{$position}-#{$color} { 4 | border-#{$position}: .25rem solid $value !important; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_display.scss: -------------------------------------------------------------------------------- 1 | // Overflow Hidden 2 | .o-hidden { 3 | overflow: hidden !important; 4 | } 5 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_progress.scss: -------------------------------------------------------------------------------- 1 | .progress-sm { 2 | height: .5rem; 3 | } 4 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_rotate.scss: -------------------------------------------------------------------------------- 1 | .rotate-15 { 2 | transform: rotate(15deg); 3 | } 4 | 5 | .rotate-n-15 { 6 | transform: rotate(-15deg); 7 | } 8 | -------------------------------------------------------------------------------- /resources/sass/dashboard/utilities/_text.scss: -------------------------------------------------------------------------------- 1 | // Grayscale Text Utilities 2 | 3 | .text-xs { 4 | font-size: .7rem; 5 | } 6 | 7 | .text-lg { 8 | font-size: 1.2rem; 9 | } 10 | 11 | .text-gray-100 { 12 | color: $gray-100 !important; 13 | } 14 | 15 | .text-gray-200 { 16 | color: $gray-200 !important; 17 | } 18 | 19 | .text-gray-300 { 20 | color: $gray-300 !important; 21 | } 22 | 23 | .text-gray-400 { 24 | color: $gray-400 !important; 25 | } 26 | 27 | .text-gray-500 { 28 | color: $gray-500 !important; 29 | } 30 | 31 | .text-gray-600 { 32 | color: $gray-600 !important; 33 | } 34 | 35 | .text-gray-700 { 36 | color: $gray-700 !important; 37 | } 38 | 39 | .text-gray-800 { 40 | color: $gray-800 !important; 41 | } 42 | 43 | .text-gray-900 { 44 | color: $gray-900 !important; 45 | } 46 | 47 | .icon-circle { 48 | height: 2.5rem; 49 | width: 2.5rem; 50 | border-radius: 100%; 51 | display: flex; 52 | align-items: center; 53 | justify-content: center; 54 | } 55 | -------------------------------------------------------------------------------- /resources/views/auth/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ ENV('APP_TITLE') }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | @yield('content') 27 |
28 | 29 | 30 | 31 | 32 | @include('dashboard.common.message') 33 | 34 | @yield('js-validation') 35 | @yield('js-scripts') 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('auth.layout') 2 | 3 | @section('content') 4 | 5 |
6 | 7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 |
15 |
16 |

17 | 18 |

19 |
20 |
21 | {{ csrf_field() }} 22 |
23 | 24 |
25 |
26 | 27 |
28 | 31 |
32 |
33 | 36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 | 45 | 46 | 47 | @stop 48 | 49 | @section('js-validation') 50 | {!! JsValidator::formRequest(\App\Http\Requests\LoginRequest::class, '#formLogin') !!} 51 | @stop 52 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 | 10 |
11 | @if (session('status')) 12 |
13 | {{ session('status') }} 14 |
15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @if ($errors->has('email')) 27 | 28 | {{ $errors->first('email') }} 29 | 30 | @endif 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @if ($errors->has('email')) 23 | 24 | {{ $errors->first('email') }} 25 | 26 | @endif 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @if ($errors->has('password')) 37 | 38 | {{ $errors->first('password') }} 39 | 40 | @endif 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 | 49 | @if ($errors->has('password_confirmation')) 50 | 51 | {{ $errors->first('password_confirmation') }} 52 | 53 | @endif 54 |
55 |
56 | 57 |
58 |
59 | 62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | @endsection 71 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Register
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @if ($errors->has('name')) 21 | 22 | {{ $errors->first('name') }} 23 | 24 | @endif 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @if ($errors->has('email')) 35 | 36 | {{ $errors->first('email') }} 37 | 38 | @endif 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @if ($errors->has('password')) 49 | 50 | {{ $errors->first('password') }} 51 | 52 | @endif 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/dashboard/common/form_buttons.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /resources/views/dashboard/common/message.blade.php: -------------------------------------------------------------------------------- 1 | @if(Session::has('message')) 2 | 3 | 16 | @endif 17 | -------------------------------------------------------------------------------- /resources/views/dashboard/common/navbar.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 65 | 66 | -------------------------------------------------------------------------------- /resources/views/dashboard/common/topbar.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 95 | 96 | -------------------------------------------------------------------------------- /resources/views/dashboard/exports/users/export.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @foreach($users as $user) 10 | 11 | 12 | 13 | 14 | @endforeach 15 | 16 |
NombreEmail
{{ $user->completeName() }}{{ $user->email }}
17 | -------------------------------------------------------------------------------- /resources/views/dashboard/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 | 5 | 6 |
7 |

Dashboard

8 | Generate Report 9 |
10 | 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 | 19 | @stop 20 | -------------------------------------------------------------------------------- /resources/views/dashboard/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ ENV('APP_TITLE') }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | @include('dashboard.common.navbar') 27 | 28 |
29 | 30 |
31 | 32 | @include('dashboard.common.topbar') 33 | 34 |
35 | 36 | @yield('content') 37 | 38 |
39 |
40 | 41 | 42 |
43 |
44 | 47 |
48 |
49 | 50 | 51 |
52 | 53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | @include('dashboard.common.message') 66 | 67 | @yield('js-validation') 68 | @yield('js-scripts') 69 | 70 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /resources/views/dashboard/pdfs/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Exportar por contenido
9 |
10 | 15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 |
26 |
27 | {{ csrf_field() }} 28 | 29 |
30 |
31 |
32 | 33 | 34 |
35 | 36 |
37 |
38 |
39 |
Exportar por URL
40 |
41 |
42 |
43 |
44 | 45 |
46 | {{ csrf_field() }} 47 |
48 |
49 |
50 | 51 | 52 |
53 |
54 |
55 |
56 |
57 | 58 |
59 |
60 |
61 |
62 | 63 |
64 | 65 |
66 | 67 |
68 |
69 |
70 |
Exportar por Vista
71 |
72 |
73 |
74 | 75 |
76 | 77 | 78 | Exportar 79 | 80 |
81 |
82 | @stop 83 | 84 | @section('js-scripts') 85 | 86 | 108 | @stop 109 | -------------------------------------------------------------------------------- /resources/views/dashboard/permissions/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Administrador de Permiso / Nuevo
9 |
10 |
11 |
12 |
13 |
14 | {{ csrf_field() }} 15 | @include('dashboard.permissions.partials.form') 16 | @include('dashboard.common.form_buttons') 17 |
18 |
19 |
20 | 21 | 22 | @stop 23 | 24 | 25 | @section('js-validation') 26 | {!! JsValidator::formRequest(\App\Http\Requests\PermissionRequest::class, '#formCreatePermissions') !!} 27 | @stop 28 | -------------------------------------------------------------------------------- /resources/views/dashboard/permissions/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Administrador de Roles / Editar
9 |
10 |
11 |
12 |
13 |
14 | 15 | {{ csrf_field() }} 16 | @include('dashboard.permissions.partials.form') 17 | @include('dashboard.common.form_buttons') 18 |
19 |
20 |
21 | 22 | 23 | @stop 24 | 25 | @section('js-validation') 26 | {!! JsValidator::formRequest(\App\Http\Requests\PermissionRequest::class, '#formEditPermissions') !!} 27 | @stop 28 | -------------------------------------------------------------------------------- /resources/views/dashboard/permissions/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
Lista de Permisos
12 |
13 | 21 |
22 |
23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | @foreach ($items as $index => $item) 37 | 38 | 39 | 40 | 41 | 42 | 54 | 55 | @endforeach 56 | 57 |
#NombreCódigoDescripciónAcciones
{{$index + 1}}{{ $item->name }}{{ $item->display_name }}{{ $item->description }} 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
58 | @if($items->total() > 0) 59 |
60 |
Mostrando registros del {{$items->firstItem()}} al {{$items->lastItem()}} de {{$items->total()}}.
61 |
{{$items->appends(['search' => request('search')])->links()}}
62 |
63 | @endif 64 |
65 |
66 |
67 | 68 | @stop 69 | -------------------------------------------------------------------------------- /resources/views/dashboard/permissions/partials/form.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | 7 | 8 |
9 |
10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 | 18 |
19 |
20 |
21 | 22 | 23 |
24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /resources/views/dashboard/roles/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Administrador de Roles / Nuevo
9 |
10 |
11 |
12 |
13 |
14 | {{ csrf_field() }} 15 | @include('dashboard.roles.partials.form') 16 | @include('dashboard.common.form_buttons') 17 |
18 |
19 |
20 | 21 | 22 | @stop 23 | 24 | @section('js-validation') 25 | {!! JsValidator::formRequest(\App\Http\Requests\RoleRequest::class, '#formCreateRoles') !!} 26 | @stop 27 | -------------------------------------------------------------------------------- /resources/views/dashboard/roles/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Administrador de Roles / Editar
9 |
10 |
11 |
12 |
13 |
14 | 15 | {{ csrf_field() }} 16 | @include('dashboard.roles.partials.form') 17 | @include('dashboard.common.form_buttons') 18 |
19 |
20 |
21 | 22 | 23 | @stop 24 | 25 | @section('js-validation') 26 | {!! JsValidator::formRequest(\App\Http\Requests\RoleRequest::class, '#formEditRoles') !!} 27 | @stop 28 | -------------------------------------------------------------------------------- /resources/views/dashboard/roles/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 |
Lista de Roles
12 |
13 | 21 |
22 |
23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | @foreach ($items as $index => $item) 37 | 38 | 39 | 40 | 41 | 42 | 54 | 55 | @endforeach 56 | 57 |
#NombreCódigoDescripciónAcciones
{{$index + 1}}{{ $item->name }}{{ $item->display_name }}{{ $item->description }} 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
58 | @if($items->total() > 0) 59 |
60 |
Mostrando registros del {{$items->firstItem()}} al {{$items->lastItem()}} de {{$items->total()}}.
61 |
{{$items->appends(['search' => request('search')])->links()}}
62 |
63 | @endif 64 |
65 |
66 |
67 | 68 | @stop 69 | -------------------------------------------------------------------------------- /resources/views/dashboard/roles/partials/form.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | 7 | 8 |
9 |
10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 | 18 |
19 |
20 |
21 | 22 | 23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 | 31 | 37 |
38 |
39 |
40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /resources/views/dashboard/users/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Administrador de Usuarios
9 |
10 |
11 |
12 |
13 |
14 | {{ csrf_field() }} 15 | @include('dashboard.users.partials.form') 16 | @include('dashboard.common.form_buttons') 17 |
18 |
19 |
20 | 21 | 22 | @stop 23 | 24 | @section('js-validation') 25 | {!! JsValidator::formRequest(\App\Http\Requests\UserRequest::class, '#formCreateUser') !!} 26 | @stop 27 | -------------------------------------------------------------------------------- /resources/views/dashboard/users/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('dashboard.layout') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Administrador de Usuarios - Modificar Usuario
9 |
10 |
11 |
12 |
13 |
14 | 15 | 16 | {{ csrf_field() }} 17 | @include('dashboard.users.partials.form') 18 | @include('dashboard.common.form_buttons') 19 |
20 | 21 |
22 |
23 | 24 | @stop 25 | 26 | @section('js-validation') 27 | {!! JsValidator::formRequest(\App\Http\Requests\UserRequest::class, '#formEditUser') !!} 28 | @stop 29 | -------------------------------------------------------------------------------- /resources/views/dashboard/users/partials/form.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 |
10 |
11 | 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 | 20 | 21 |
22 |
23 |
24 |
25 | 26 | 27 |
28 |
29 |
30 |
31 | 32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 | 41 |
42 |
43 |
44 |
45 |
46 |
47 | 48 | 49 |
50 |
51 |
52 |
53 | 54 | 55 |
56 |
57 |
58 | 59 |
60 |
61 |
62 | 63 | 69 |
70 |
71 |
72 | 73 |
74 |
75 |
76 | 77 | 78 |
79 |
80 |
81 | -------------------------------------------------------------------------------- /resources/views/vendor/jsvalidation/bootstrap.php: -------------------------------------------------------------------------------- 1 | 57 | -------------------------------------------------------------------------------- /resources/views/vendor/jsvalidation/bootstrap4.php: -------------------------------------------------------------------------------- 1 | 56 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | */ 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('index'); 17 | 18 | Route::get('/login', 'Auth\LoginController@showLoginForm')->name('login.form'); 19 | Route::post('/login', 'Auth\LoginController@login')->name('login'); 20 | Route::get('/logout', 'Auth\LoginController@logout')->name('logout'); 21 | Route::post('/password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); 22 | Route::post('/password/reset', 'Auth\ResetPasswordController@reset')->name('password.change'); 23 | Route::get('/password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.reset'); 24 | Route::get('/password/reset/{token} ', 'Auth\ResetPasswordController@showResetForm'); 25 | 26 | 27 | Route::group(['prefix' => 'dashboard', 'namespace' => 'Dashboard', 'as' => 'dashboard::'], function () { 28 | 29 | 30 | Route::group(['middleware' => ['auth']], function () { 31 | 32 | Route::get('/', 'HomeController@index')->name('index'); 33 | 34 | Route::resource('/users', 'UserController', ['except' => ['show']]); 35 | Route::get('/users/{user}/access', 'UserController@toggleAccess')->name('users.toggleAccess'); 36 | Route::get('/users/export', 'UserController@export')->name('users.export'); 37 | 38 | Route::resource('/roles', 'RoleController', ['except' => ['show']]); 39 | Route::resource('/permissions', 'PermissionController', ['except' => ['show']]); 40 | Route::get('/common/slug/{name}', 'CommonController@slug')->name('common.slug'); 41 | 42 | Route::get('/pdfs', 'PdfController@index')->name('pdfs.index'); 43 | Route::post('/pdfs/generate', 'PdfController@export_document_generate')->name('pdfs.export_document_generate'); 44 | Route::post('/pdfs/url', 'PdfController@export_document_url')->name('pdfs.export_document_url'); 45 | Route::get('/pdfs/view', 'PdfController@export_by_view')->name('pdfs.export_by_view'); 46 | 47 | 48 | }); 49 | 50 | 51 | 52 | }); 53 | 54 | 55 | /* 56 | |-------------------------------------------------------------------------- 57 | | Ruta especifica para visualizar paginas estáticas. 58 | |-------------------------------------------------------------------------- 59 | | 60 | | Esta ruta permite visualizar paginas estáticas siempre que se las pida 61 | | a través de la extensión "html". 62 | | 63 | */ 64 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/dashboard/app.js', 'public/js/dashboard.js') 15 | .sass('resources/sass/dashboard/app.scss', 'public/css/dashboard.css') 16 | 17 | .combine([ 18 | 'node_modules/datatables.net/js/jquery.dataTables.js', 19 | 'node_modules/datatables.net-bs/js/dataTables.bootstrap.js', 20 | 'node_modules/datatables.net/js/jquery.dataTables.js', 21 | 'node_modules/datatables.net-responsive/js/dataTables.responsive.js', 22 | 'node_modules/select2/dist/js/select2.min.js', 23 | 'node_modules/moment/min/moment.min.js', 24 | 'node_modules/moment/moment.js', 25 | 'node_modules/daterangepicker/daterangepicker.js', 26 | './vendor/proengsoft/laravel-jsvalidation/public/js/jsvalidation.js', 27 | 'node_modules/switchery/standalone/switchery.js', 28 | 'node_modules/sweetalert2/dist/sweetalert2.min.js', 29 | 'node_modules/@ckeditor/ckeditor5-build-decoupled-document/build/ckeditor.js', 30 | ], 'public/js/dashboard_resources.js') 31 | 32 | .combine([ 33 | 'node_modules/datatables.net-bs/css/dataTables.bootstrap.css', 34 | 'node_modules/datatables.net-responsive-bs/css/responsive.bootstrap.css', 35 | 'node_modules/select2/dist/css/select2.min.css', 36 | 'node_modules/select2-bootstrap-theme/dist/select2-bootstrap.min.css', 37 | 'node_modules/daterangepicker/daterangepicker.css', 38 | 'node_modules/switchery/standalone/switchery.css', 39 | 'node_modules/sweetalert2/dist/sweetalert2.min.css' 40 | ], 'public/css/dashboard_resources.css') 41 | 42 | .copyDirectory('resources/img', 'public/img') 43 | .copyDirectory('resources/fonts', 'public/fonts'); 44 | --------------------------------------------------------------------------------