├── .env.example ├── .gitattributes ├── .gitignore ├── .htaccess ├── LICENSE ├── README.md ├── app ├── Console │ ├── Commands │ │ ├── InstallAppCommand.php │ │ ├── RepositoryMakeCommand.php │ │ └── stubs │ │ │ ├── baseRepository.stub │ │ │ └── repository.stub │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Helper │ ├── helper.php │ └── uuid.php ├── Http │ ├── Controllers │ │ ├── Api │ │ │ └── V1 │ │ │ │ ├── APIController.php │ │ │ │ ├── AuthController.php │ │ │ │ ├── ConfigurationController.php │ │ │ │ ├── SocialAuthController.php │ │ │ │ ├── TaskController.php │ │ │ │ ├── TodoController.php │ │ │ │ └── UserController.php │ │ ├── Controller.php │ │ └── SocialAuthController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Resources │ │ └── UserResource.php ├── Models │ ├── Configuration │ │ ├── Configuration.php │ │ └── Traits │ │ │ ├── Relationship │ │ │ └── ConfigurationRelationship.php │ │ │ └── Scope │ │ │ └── ConfigurationScope.php │ ├── Profile │ │ ├── Profile.php │ │ └── Traits │ │ │ ├── Relationship │ │ │ └── ProfileRelationship.php │ │ │ └── Scope │ │ │ └── ProfileScope.php │ ├── Task │ │ ├── Task.php │ │ └── Traits │ │ │ ├── Relationships │ │ │ └── TaskRelationship.php │ │ │ └── Scope │ │ │ └── TaskScope.php │ ├── Todo │ │ ├── Todo.php │ │ └── Traits │ │ │ ├── Relationship │ │ │ └── TodoRelationship.php │ │ │ └── Scope │ │ │ └── TodoScope.php │ └── User │ │ ├── Traits │ │ ├── Relationship │ │ │ └── UserRelationship.php │ │ └── Scope │ │ │ └── UserScope.php │ │ └── User.php ├── Notifications │ ├── Activated.php │ ├── Activation.php │ ├── PasswordReset.php │ └── PasswordResetted.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── Repositories │ ├── BaseRepository.php │ ├── Configuration │ └── ConfigurationRepository.php │ ├── Task │ └── TaskRepository.php │ ├── Todo │ └── TodoRepository.php │ └── User │ └── UserRepository.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── composer.phar ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── config-variables.php ├── database.php ├── filesystems.php ├── image.php ├── jwt.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── dump │ └── laravel_vue_spa_boilerplate.sql ├── factories │ └── UserFactory.php ├── migrations │ ├── 2017_08_21_075229_create_password_resets_table.php │ ├── 2017_08_21_075329_create_users_table.php │ ├── 2017_08_21_075429_create_config_table.php │ ├── 2017_08_21_075605_create_tasks_table.php │ ├── 2017_08_24_053036_create_profiles_table.php │ └── 2017_08_27_104452_create_todos_table.php └── seeds │ ├── DatabaseSeeder.php │ ├── DisableForeignKeys.php │ ├── TruncateTable.php │ └── UsersTableSeeder.php ├── grumphp.yml ├── install.sh ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── style.css ├── favicon.ico ├── fonts │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── shape1.svg │ └── tooltip1.svg ├── images │ ├── background │ │ ├── background.jpg │ │ └── error-bg.jpg │ ├── custom-select.png │ ├── error-bg.jpg │ ├── favicon.ico │ ├── favicon.png │ ├── logo-icon-1.png │ ├── logo-icon.png │ ├── logo-text.png │ ├── new-favicon.ico │ ├── new-logo-icon.png │ ├── new-logo-text.png │ ├── tooltip │ │ ├── Euclid.png │ │ ├── shape1.svg │ │ ├── shape2.svg │ │ ├── shape3.svg │ │ ├── tooltip1.svg │ │ ├── tooltip2.svg │ │ └── tooltip3.svg │ └── users │ │ ├── 599acd6daefc1.jpg │ │ ├── 599ad113ecc33.jpg │ │ ├── 599ad12d61dcb.jpg │ │ ├── 59a27adf5dd47.jpg │ │ ├── 59a426a84095b.jpg │ │ ├── 59a426d1b817f.jpg │ │ ├── 59a6dac0a47a2.jpg │ │ ├── 59f6ba737c2ee.jpg │ │ └── avatar.png ├── index.php ├── js │ ├── app.js │ └── bundle.min.js ├── mix-manifest.json └── robots.txt ├── resources ├── assets │ ├── images │ │ ├── background │ │ │ ├── background.jpg │ │ │ └── error-bg.jpg │ │ ├── custom-select.png │ │ ├── favicon.png │ │ ├── logo-icon.png │ │ ├── logo-light-icon.png │ │ ├── logo-light-text.png │ │ ├── logo-text.png │ │ ├── tooltip │ │ │ ├── Euclid.png │ │ │ ├── shape1.svg │ │ │ ├── shape2.svg │ │ │ ├── shape3.svg │ │ │ ├── tooltip1.svg │ │ │ ├── tooltip2.svg │ │ │ └── tooltip3.svg │ │ └── users │ │ │ └── john.doe.jpg │ ├── js │ │ ├── app.js │ │ ├── bootstrap.js │ │ ├── custom.js │ │ ├── layouts │ │ │ ├── default-page.vue │ │ │ ├── error-page.vue │ │ │ ├── footer.vue │ │ │ ├── guest-footer.vue │ │ │ ├── guest-page.vue │ │ │ ├── header.vue │ │ │ ├── right-sidebar.vue │ │ │ └── sidebar.vue │ │ ├── routes.js │ │ ├── services │ │ │ ├── errors.js │ │ │ ├── form.js │ │ │ └── helper.js │ │ ├── store.js │ │ └── views │ │ │ ├── auth │ │ │ ├── activate.vue │ │ │ ├── login.vue │ │ │ ├── password.vue │ │ │ ├── register.vue │ │ │ ├── reset.vue │ │ │ └── social-auth.vue │ │ │ ├── configuration │ │ │ └── configuration.vue │ │ │ ├── errors │ │ │ └── page-not-found.vue │ │ │ ├── pages │ │ │ ├── blank.vue │ │ │ └── home.vue │ │ │ ├── task │ │ │ ├── edit.vue │ │ │ ├── form.vue │ │ │ └── index.vue │ │ │ └── user │ │ │ ├── edit.vue │ │ │ ├── form.vue │ │ │ ├── index.vue │ │ │ └── profile.vue │ ├── plugins │ │ ├── bootstrap │ │ │ ├── bootstrap.min.js │ │ │ └── sass │ │ │ │ ├── _alert.scss │ │ │ │ ├── _badge.scss │ │ │ │ ├── _breadcrumb.scss │ │ │ │ ├── _button-group.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _card.scss │ │ │ │ ├── _carousel.scss │ │ │ │ ├── _close.scss │ │ │ │ ├── _code.scss │ │ │ │ ├── _custom-forms.scss │ │ │ │ ├── _dropdown.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _functions.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _images.scss │ │ │ │ ├── _input-group.scss │ │ │ │ ├── _jumbotron.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _media.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _modal.scss │ │ │ │ ├── _nav.scss │ │ │ │ ├── _navbar.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _popover.scss │ │ │ │ ├── _print.scss │ │ │ │ ├── _progress.scss │ │ │ │ ├── _reboot.scss │ │ │ │ ├── _tables.scss │ │ │ │ ├── _tooltip.scss │ │ │ │ ├── _transitions.scss │ │ │ │ ├── _type.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _variables.scss │ │ │ │ ├── bootstrap-grid.scss │ │ │ │ ├── bootstrap-reboot.scss │ │ │ │ ├── bootstrap.scss │ │ │ │ ├── mixins │ │ │ │ ├── _alert.scss │ │ │ │ ├── _background-variant.scss │ │ │ │ ├── _badge.scss │ │ │ │ ├── _border-radius.scss │ │ │ │ ├── _box-shadow.scss │ │ │ │ ├── _breakpoints.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _float.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _gradients.scss │ │ │ │ ├── _grid-framework.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _hover.scss │ │ │ │ ├── _image.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _lists.scss │ │ │ │ ├── _nav-divider.scss │ │ │ │ ├── _navbar-align.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _reset-text.scss │ │ │ │ ├── _resize.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _table-row.scss │ │ │ │ ├── _text-emphasis.scss │ │ │ │ ├── _text-hide.scss │ │ │ │ ├── _text-truncate.scss │ │ │ │ ├── _transition.scss │ │ │ │ └── _visibility.scss │ │ │ │ └── utilities │ │ │ │ ├── _align.scss │ │ │ │ ├── _background.scss │ │ │ │ ├── _borders.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _display.scss │ │ │ │ ├── _embed.scss │ │ │ │ ├── _flex.scss │ │ │ │ ├── _float.scss │ │ │ │ ├── _position.scss │ │ │ │ ├── _screenreaders.scss │ │ │ │ ├── _sizing.scss │ │ │ │ ├── _spacing.scss │ │ │ │ ├── _text.scss │ │ │ │ └── _visibility.scss │ │ ├── font-awesome │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── less │ │ │ │ ├── animated.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── screen-reader.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ └── scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ ├── jquery │ │ │ └── jquery.min.js │ │ ├── moment │ │ │ └── moment.min.js │ │ ├── popper │ │ │ └── popper.min.js │ │ ├── sidebarmenu.js │ │ ├── slimscroll │ │ │ └── jquery.slimscroll.js │ │ ├── sticky-kit │ │ │ └── sticky-kit.min.js │ │ ├── toastr │ │ │ ├── toastr.min.css │ │ │ └── toastr.min.js │ │ └── waves │ │ │ └── waves.js │ └── sass │ │ ├── _variables.scss │ │ ├── animate.css │ │ ├── app.scss │ │ ├── color.scss │ │ ├── custom.scss │ │ ├── grid.scss │ │ ├── pages.scss │ │ ├── responsive.scss │ │ ├── sidebar.scss │ │ ├── spinners.css │ │ ├── style.scss │ │ ├── variable.scss │ │ └── widgets.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── home.blade.php │ └── layouts │ └── master.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php ├── webpack.mix.js └── yarn.lock /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME="Laravel-Vue-Spa-Boilerplate" 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL= 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST=localhost 10 | DB_PORT= 11 | DB_DATABASE= 12 | DB_USERNAME= 13 | DB_PASSWORD= 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | SESSION_DRIVER=file 18 | QUEUE_DRIVER=sync 19 | 20 | REDIS_HOST=127.0.0.1 21 | REDIS_PASSWORD=null 22 | REDIS_PORT=6379 23 | 24 | MAIL_DRIVER=log 25 | MAIL_HOST=smtp.mailtrap.io 26 | MAIL_PORT=2525 27 | MAIL_USERNAME=null 28 | MAIL_PASSWORD=null 29 | MAIL_ENCRYPTION=null 30 | MAIL_FROM_ADDRESS=hello@example.com 31 | MAIL_FROM_NAME=Hello 32 | 33 | PUSHER_APP_ID= 34 | PUSHER_APP_KEY= 35 | PUSHER_APP_SECRET= 36 | 37 | IS_DEMO=0 38 | 39 | GITHUB_APP_ID= 40 | GITHUB_APP_SECRET= 41 | GITHUB_REDIRECT= 42 | 43 | FACEBOOK_APP_ID= 44 | FACEBOOK_APP_SECRET= 45 | FACEBOOK_REDIRECT= 46 | 47 | TWITTER_APP_ID= 48 | TWITTER_APP_SECRET= 49 | TWITTER_REDIRECT= 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/storage 4 | /public/images/users 5 | /storage/*.key 6 | /vendor 7 | /.idea 8 | /.vagrant 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | .env 14 | access.log 15 | error.log -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteRule ^(.*)$ public/$1 [L] 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 ViitorCloud (https://viitorcloud.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/Console/Commands/RepositoryMakeCommand.php: -------------------------------------------------------------------------------- 1 | option('base')) { 39 | return __DIR__.'/stubs/baseRepository.stub'; 40 | } 41 | 42 | return __DIR__.'/stubs/repository.stub'; 43 | } 44 | 45 | /** 46 | * Get the default namespace for the class. 47 | * 48 | * @param string $rootNamespace 49 | * 50 | * @return string 51 | */ 52 | protected function getDefaultNamespace($rootNamespace) 53 | { 54 | return $rootNamespace.'\Repositories'; 55 | } 56 | 57 | /** 58 | * Get the console command options. 59 | * 60 | * @return array 61 | */ 62 | protected function getOptions() 63 | { 64 | return [ 65 | ['base', 'b', InputOption::VALUE_NONE, 'Create the base repository.'], 66 | ]; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/Console/Commands/stubs/baseRepository.stub: -------------------------------------------------------------------------------- 1 | query()->get(); 13 | } 14 | 15 | /** 16 | * @return mixed 17 | */ 18 | public function getPaginate($limit) 19 | { 20 | return $this->query()->paginate($limit); 21 | } 22 | 23 | /** 24 | * @return mixed 25 | */ 26 | public function getCount() 27 | { 28 | return $this->query()->count(); 29 | } 30 | 31 | /** 32 | * @param $id 33 | * 34 | * @return mixed 35 | */ 36 | public function find($id) 37 | { 38 | return $this->query()->find($id); 39 | } 40 | 41 | /** 42 | * @return mixed 43 | */ 44 | public function query() 45 | { 46 | return call_user_func(static::MODEL.'::query'); 47 | } 48 | } -------------------------------------------------------------------------------- /app/Console/Commands/stubs/repository.stub: -------------------------------------------------------------------------------- 1 | command('inspire') 32 | // ->hourly(); 33 | } 34 | 35 | /** 36 | * Register the commands for the application. 37 | * 38 | * @return void 39 | */ 40 | protected function commands() 41 | { 42 | $this->load(__DIR__.'/Commands'); 43 | 44 | require base_path('routes/console.php'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | json(['message' => 'Your session is expired. Please login again!'], $exception->getStatusCode()); 42 | } elseif ($exception instanceof Tymon\JWTAuth\Exceptions\TokenInvalidException) { 43 | return response()->json(['message' => 'Invalid login token. Please login again!'], $exception->getStatusCode()); 44 | } 45 | 46 | parent::report($exception); 47 | } 48 | 49 | /** 50 | * Render an exception into an HTTP response. 51 | * 52 | * @param \Illuminate\Http\Request $request 53 | * @param \Exception $exception 54 | * 55 | * @return \Illuminate\Http\Response 56 | */ 57 | public function render($request, Exception $exception) 58 | { 59 | return parent::render($request, $exception); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Helper/helper.php: -------------------------------------------------------------------------------- 1 | reconnect(); 19 | 20 | return true; 21 | } catch (Exception $ex) { 22 | return false; 23 | } 24 | } 25 | 26 | if (!function_exists('checkDatabaseConnection')) { 27 | 28 | /** 29 | * @return bool 30 | */ 31 | function checkDatabaseConnection() 32 | { 33 | try { 34 | DB::connection()->reconnect(); 35 | 36 | return true; 37 | } catch (Exception $ex) { 38 | return false; 39 | } 40 | } 41 | } 42 | 43 | if (!function_exists('dbTrans')) { 44 | 45 | /** 46 | * @param string $lang 47 | * @param string $tableName 48 | * 49 | * @return string 50 | */ 51 | function dbTrans(string $lang, string $tableName) 52 | { 53 | return $lang.'_'.config('table-variables.field_post_fix.'.$tableName); 54 | } 55 | } 56 | 57 | if (!function_exists('pluckDBTrans')) { 58 | 59 | /** 60 | * @param $query 61 | * @param string $fieldName 62 | * 63 | * @return mixed 64 | */ 65 | function pluckDBTrans($query, string $fieldName) 66 | { 67 | return $query->where($fieldName, '!=', null) 68 | ->pluck($fieldName, 'id') 69 | ->toArray(); 70 | } 71 | } 72 | 73 | if (!function_exists('labelManipulate')) { 74 | 75 | /** 76 | * @param string $configFileName 77 | * @param string $key 78 | * 79 | * @return array|bool|\Illuminate\Contracts\Translation\Translator|null|string 80 | */ 81 | function labelManipulate(string $configFileName, string $key) 82 | { 83 | try { 84 | return trans($configFileName.'.'.$key); 85 | } catch (\Exception $ex) { 86 | return false; 87 | } 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/ConfigurationController.php: -------------------------------------------------------------------------------- 1 | configuration = $conf; 26 | } 27 | 28 | /** 29 | * @return \Illuminate\Http\JsonResponse 30 | */ 31 | public function index() 32 | { 33 | $config = $this->configuration->getConfigurationData(); 34 | 35 | return response()->json(compact('config')); 36 | } 37 | 38 | /** 39 | * @param Request $request 40 | * 41 | * @return \Illuminate\Http\JsonResponse 42 | */ 43 | public function store(Request $request) 44 | { 45 | $input = $request->all(); 46 | 47 | $config = $this->configuration->storeConfigurationData($input); 48 | 49 | return response()->json(['message' => 'Configuration stored successfully!']); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/TaskController.php: -------------------------------------------------------------------------------- 1 | task = $task; 26 | } 27 | 28 | /** 29 | * @return \Illuminate\Http\JsonResponse 30 | */ 31 | public function index() 32 | { 33 | $tasks = $this->task->getTasks(); 34 | 35 | return $tasks; 36 | } 37 | 38 | /** 39 | * @param Request $request 40 | * 41 | * @return \Illuminate\Http\JsonResponse 42 | */ 43 | public function store(Request $request) 44 | { 45 | $input = $request->all(); 46 | 47 | $tasks = $this->task->storeTask($input); 48 | 49 | return $tasks; 50 | } 51 | 52 | /** 53 | * @param $id 54 | * 55 | * @return \Illuminate\Http\JsonResponse 56 | */ 57 | public function destroy($id) 58 | { 59 | $tasks = $this->task->deleteTask($id); 60 | 61 | return $tasks; 62 | } 63 | 64 | /** 65 | * @param $id 66 | * 67 | * @return \Illuminate\Http\JsonResponse 68 | */ 69 | public function show($id) 70 | { 71 | $tasks = $this->task->showTask($id); 72 | 73 | return $tasks; 74 | } 75 | 76 | /** 77 | * @param Request $request 78 | * @param $id 79 | * 80 | * @return \Illuminate\Http\JsonResponse 81 | */ 82 | public function update(Request $request, $id) 83 | { 84 | $input = $request->all(); 85 | 86 | $tasks = $this->task->updateTask($input, $id); 87 | 88 | return $tasks; 89 | } 90 | 91 | /** 92 | * @param Request $request 93 | * 94 | * @return \Illuminate\Http\JsonResponse 95 | */ 96 | public function toggleStatus(Request $request) 97 | { 98 | $tasks = $this->task->taskStatus($request); 99 | 100 | return $tasks; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/V1/TodoController.php: -------------------------------------------------------------------------------- 1 | todo = $todo; 26 | } 27 | 28 | /** 29 | * @return \Illuminate\Http\JsonResponse 30 | */ 31 | public function index() 32 | { 33 | $todo = $this->todo->getTodoList(); 34 | 35 | return $todo; 36 | } 37 | 38 | /** 39 | * @param Request $request 40 | * 41 | * @return \Illuminate\Http\JsonResponse 42 | */ 43 | public function store(Request $request) 44 | { 45 | $input = $request->all(); 46 | 47 | $tasks = $this->todo->storeTodo($input); 48 | 49 | return $tasks; 50 | } 51 | 52 | /** 53 | * @return \Illuminate\Http\JsonResponse 54 | */ 55 | public function toggleStatus() 56 | { 57 | $tasks = $this->todo->todoStatus(); 58 | 59 | return $tasks; 60 | } 61 | 62 | /** 63 | * @param $id 64 | * 65 | * @return \Illuminate\Http\JsonResponse 66 | */ 67 | public function destroy($id) 68 | { 69 | $tasks = $this->todo->deleteTodo($id); 70 | 71 | return $tasks; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.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' => \Illuminate\Auth\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 60 | 'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class, 61 | 'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class, 62 | ]; 63 | } 64 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | return redirect('/home'); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'FORWARDED', 24 | Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', 25 | Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', 26 | Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', 27 | Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | $this->id, 20 | 'email' => $this->email, 21 | 'status' => $this->status, 22 | 'created_at' => $this->created_at, 23 | 'updated_at' => $this->updated_at, 24 | 'profile' => $this->profile, 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Models/Configuration/Configuration.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/Profile/Traits/Scope/ProfileScope.php: -------------------------------------------------------------------------------- 1 | hasOne(Profile::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Models/User/Traits/Scope/UserScope.php: -------------------------------------------------------------------------------- 1 | with('profile'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/User/User.php: -------------------------------------------------------------------------------- 1 | getKey(); 46 | } 47 | 48 | /** 49 | * Return a key value array, containing any custom claims to be added to the JWT. 50 | * 51 | * @return array 52 | */ 53 | public function getJWTCustomClaims() 54 | { 55 | return []; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/Notifications/Activated.php: -------------------------------------------------------------------------------- 1 | user = $user; 23 | } 24 | 25 | /** 26 | * Get the notification's delivery channels. 27 | * 28 | * @param mixed $notifiable 29 | * 30 | * @return array 31 | */ 32 | public function via($notifiable) 33 | { 34 | return ['mail']; 35 | } 36 | 37 | /** 38 | * Get the mail representation of the notification. 39 | * 40 | * @param mixed $notifiable 41 | * 42 | * @return \Illuminate\Notifications\Messages\MailMessage 43 | */ 44 | public function toMail($notifiable) 45 | { 46 | $url = url('/'); 47 | 48 | return (new MailMessage()) 49 | ->greeting('Hello!') 50 | ->line('Your account has been activated.') 51 | ->line('Click on the below link to go to our application!') 52 | ->action('Proceed', $url) 53 | ->line('Thank you for using our application!'); 54 | } 55 | 56 | /** 57 | * Get the array representation of the notification. 58 | * 59 | * @param mixed $notifiable 60 | * 61 | * @return array 62 | */ 63 | public function toArray($notifiable) 64 | { 65 | return [ 66 | // 67 | ]; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/Notifications/Activation.php: -------------------------------------------------------------------------------- 1 | user = $user; 23 | } 24 | 25 | /** 26 | * Get the notification's delivery channels. 27 | * 28 | * @param mixed $notifiable 29 | * 30 | * @return array 31 | */ 32 | public function via($notifiable) 33 | { 34 | return ['mail']; 35 | } 36 | 37 | /** 38 | * Get the mail representation of the notification. 39 | * 40 | * @param mixed $notifiable 41 | * 42 | * @return \Illuminate\Notifications\Messages\MailMessage 43 | */ 44 | public function toMail($notifiable) 45 | { 46 | $url = url('/auth/'.$this->user->activation_token.'/activate'); 47 | 48 | return (new MailMessage()) 49 | ->greeting('Hello!') 50 | ->line('Thank you for registering an account with us.') 51 | ->line('Click on the below link to verify your email!') 52 | ->action('Verify now!', $url) 53 | ->line('Thank you for using our application!'); 54 | } 55 | 56 | /** 57 | * Get the array representation of the notification. 58 | * 59 | * @param mixed $notifiable 60 | * 61 | * @return array 62 | */ 63 | public function toArray($notifiable) 64 | { 65 | return [ 66 | // 67 | ]; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/Notifications/PasswordReset.php: -------------------------------------------------------------------------------- 1 | user = $user; 24 | $this->token = $token; 25 | } 26 | 27 | /** 28 | * Get the notification's delivery channels. 29 | * 30 | * @param mixed $notifiable 31 | * 32 | * @return array 33 | */ 34 | public function via($notifiable) 35 | { 36 | return ['mail']; 37 | } 38 | 39 | /** 40 | * Get the mail representation of the notification. 41 | * 42 | * @param mixed $notifiable 43 | * 44 | * @return \Illuminate\Notifications\Messages\MailMessage 45 | */ 46 | public function toMail($notifiable) 47 | { 48 | $url = url('/password/reset/'.$this->token); 49 | 50 | return (new MailMessage()) 51 | ->greeting('Hello!') 52 | ->line('We have recevied password reset request from you!') 53 | ->line('Click on the below link to reset your password.') 54 | ->action('Reset Password', $url) 55 | ->line('If you haven\'t requested for password reset, please ignore this email.') 56 | ->line('Thank you!'); 57 | } 58 | 59 | /** 60 | * Get the array representation of the notification. 61 | * 62 | * @param mixed $notifiable 63 | * 64 | * @return array 65 | */ 66 | public function toArray($notifiable) 67 | { 68 | return [ 69 | // 70 | ]; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/Notifications/PasswordResetted.php: -------------------------------------------------------------------------------- 1 | user = $user; 23 | } 24 | 25 | /** 26 | * Get the notification's delivery channels. 27 | * 28 | * @param mixed $notifiable 29 | * 30 | * @return array 31 | */ 32 | public function via($notifiable) 33 | { 34 | return ['mail']; 35 | } 36 | 37 | /** 38 | * Get the mail representation of the notification. 39 | * 40 | * @param mixed $notifiable 41 | * 42 | * @return \Illuminate\Notifications\Messages\MailMessage 43 | */ 44 | public function toMail($notifiable) 45 | { 46 | $url = url('/'); 47 | 48 | return (new MailMessage()) 49 | ->greeting('Hello!') 50 | ->line('Your password has been reset successfully!') 51 | ->line('Click on the below link to continue login.') 52 | ->action('Login', $url) 53 | ->line('If you haven\'t changed your password, please contact administrator.') 54 | ->line('Thank you!'); 55 | } 56 | 57 | /** 58 | * Get the array representation of the notification. 59 | * 60 | * @param mixed $notifiable 61 | * 62 | * @return array 63 | */ 64 | public function toArray($notifiable) 65 | { 66 | return [ 67 | // 68 | ]; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 16 | ]; 17 | 18 | /** 19 | * Register any authentication / authorization services. 20 | * 21 | * @return void 22 | */ 23 | public function boot() 24 | { 25 | $this->registerPolicies(); 26 | 27 | // 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /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/Repositories/BaseRepository.php: -------------------------------------------------------------------------------- 1 | query()->get(); 16 | } 17 | 18 | /** 19 | * @return mixed 20 | */ 21 | public function getCount() 22 | { 23 | return $this->query()->count(); 24 | } 25 | 26 | /** 27 | * @param $id 28 | * 29 | * @return mixed 30 | */ 31 | public function find($id) 32 | { 33 | return $this->query()->find($id); 34 | } 35 | 36 | /** 37 | * @return mixed 38 | */ 39 | public function query() 40 | { 41 | return call_user_func(static::MODEL.'::query'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Repositories/Configuration/ConfigurationRepository.php: -------------------------------------------------------------------------------- 1 | pluck('value', 'name')->all(); 21 | 22 | return $config; 23 | } 24 | 25 | /** 26 | * @param null $input 27 | */ 28 | public function storeConfigurationData($input = null) 29 | { 30 | foreach ($input as $key => $value) { 31 | $value = (is_array($value)) ? implode(',', $value) : $value; 32 | $config = Configuration::firstOrNew(['name' => $key]); 33 | $config->value = $value; 34 | $config->save(); 35 | } 36 | 37 | $config = Configuration::all()->pluck('value', 'name')->all(); 38 | 39 | return $config; 40 | } 41 | } -------------------------------------------------------------------------------- /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 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=7.0.0", 9 | "fideloper/proxy": "~3.3", 10 | "intervention/image": "^2.4", 11 | "laravel/framework": "5.5.*", 12 | "laravel/socialite": "^3.0", 13 | "laravel/tinker": "~1.0", 14 | "tymon/jwt-auth": "dev-develop" 15 | }, 16 | "require-dev": { 17 | "filp/whoops": "~2.0", 18 | "fzaninotto/faker": "~1.4", 19 | "mockery/mockery": "0.9.*", 20 | "phpunit/phpunit": "~6.0" 21 | }, 22 | "autoload": { 23 | "classmap": [ 24 | "database/seeds", 25 | "database/factories" 26 | ], 27 | "psr-4": { 28 | "App\\": "app/" 29 | }, 30 | "files": ["app/Helper/helper.php"] 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "Tests\\": "tests/" 35 | } 36 | }, 37 | "extra": { 38 | "laravel": { 39 | "dont-discover": [ 40 | ] 41 | } 42 | }, 43 | "scripts": { 44 | "post-root-package-install": [ 45 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 46 | ], 47 | "post-create-project-cmd": [ 48 | "@php artisan key:generate" 49 | ], 50 | "post-autoload-dump": [ 51 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 52 | "@php artisan package:discover" 53 | ] 54 | }, 55 | "config": { 56 | "preferred-install": "dist", 57 | "sort-packages": true, 58 | "optimize-autoloader": true 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /composer.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/composer.phar -------------------------------------------------------------------------------- /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 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /config/config-variables.php: -------------------------------------------------------------------------------- 1 | 'localhost', 5 | 'default_db_port' => 3306, 6 | 'default_db_username' => 'root', 7 | 'default_lang' => 'en', 8 | ]; 9 | -------------------------------------------------------------------------------- /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", "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_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /config/image.php: -------------------------------------------------------------------------------- 1 | 'gd', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 20 | 'domain' => env('MAILGUN_DOMAIN'), 21 | 'secret' => env('MAILGUN_SECRET'), 22 | ], 23 | 24 | 'ses' => [ 25 | 'key' => env('SES_KEY'), 26 | 'secret' => env('SES_SECRET'), 27 | 'region' => 'us-east-1', 28 | ], 29 | 30 | 'sparkpost' => [ 31 | 'secret' => env('SPARKPOST_SECRET'), 32 | ], 33 | 34 | 'stripe' => [ 35 | 'model' => User::class, 36 | 'key' => env('STRIPE_KEY'), 37 | 'secret' => env('STRIPE_SECRET'), 38 | ], 39 | 40 | ]; 41 | -------------------------------------------------------------------------------- /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' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 18 | static $password; 19 | 20 | return [ 21 | 'email' => $faker->unique()->safeEmail, 22 | 'password' => $password ?: $password = bcrypt('secret'), 23 | 'remember_token' => str_random(10), 24 | 'activation_token' => str_random(10), 25 | 'status' => 'activated', 26 | ]; 27 | }); 28 | -------------------------------------------------------------------------------- /database/migrations/2017_08_21_075229_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->string('email')->index(); 19 | $table->string('token'); 20 | $table->timestamp('created_at')->nullable(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('password_resets'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2017_08_21_075329_create_users_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id'); 19 | $table->string('email')->unique(); 20 | $table->string('password')->nullable(); 21 | $table->string('provider')->nullable(); 22 | $table->string('provider_unique_id')->nullable(); 23 | $table->string('activation_token', 64)->nullable(); 24 | $table->string('status', 25)->nullable(); 25 | $table->rememberToken(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | DB::statement('SET FOREIGN_KEY_CHECKS = 0'); 38 | Schema::dropIfExists('users'); 39 | DB::statement('SET FOREIGN_KEY_CHECKS = 1'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2017_08_21_075429_create_config_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id'); 19 | $table->string('name')->nullable(); 20 | $table->string('value')->nullable(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('config'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2017_08_21_075605_create_tasks_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id'); 19 | $table->string('uuid', 64)->nullable(); 20 | $table->integer('user_id')->unsigned(); 21 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 22 | $table->string('title')->nullable(); 23 | $table->text('description')->nullable(); 24 | $table->date('start_date')->nullable(); 25 | $table->date('due_date')->nullable(); 26 | $table->integer('progress')->default(0); 27 | $table->integer('status')->default(0); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('tasks'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2017_08_24_053036_create_profiles_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id'); 19 | $table->integer('user_id')->unsigned(); 20 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 21 | $table->string('first_name')->nullable(); 22 | $table->string('last_name')->nullable(); 23 | $table->string('gender')->nullable(); 24 | $table->date('date_of_birth')->nullable(); 25 | $table->string('avatar')->nullable(); 26 | $table->string('facebook_profile')->nullable(); 27 | $table->string('twitter_profile')->nullable(); 28 | $table->string('google_plus_profile')->nullable(); 29 | $table->timestamps(); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('profiles'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2017_08_27_104452_create_todos_table.php: -------------------------------------------------------------------------------- 1 | engine = 'InnoDB'; 18 | $table->increments('id'); 19 | $table->integer('user_id')->unsigned(); 20 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 21 | $table->string('todo')->nullable(); 22 | $table->boolean('status')->default(0); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('todos'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /database/seeds/DisableForeignKeys.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'enable' => 'SET FOREIGN_KEY_CHECKS=1;', 18 | 'disable' => 'SET FOREIGN_KEY_CHECKS=0;', 19 | ], 20 | 'sqlite' => [ 21 | 'enable' => 'PRAGMA foreign_keys = ON;', 22 | 'disable' => 'PRAGMA foreign_keys = OFF;', 23 | ], 24 | 'sqlsrv' => [ 25 | 'enable' => 'EXEC sp_msforeachtable @command1="print \'?\'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all";', 26 | 'disable' => 'EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all";', 27 | ], 28 | 'pgsql' => [ 29 | 'enable' => 'SET CONSTRAINTS ALL IMMEDIATE;', 30 | 'disable' => 'SET CONSTRAINTS ALL DEFERRED;', 31 | ], 32 | ]; 33 | 34 | /** 35 | * Disable foreign key checks for current db driver. 36 | */ 37 | protected function disableForeignKeys() 38 | { 39 | DB::statement($this->getDisableStatement()); 40 | } 41 | 42 | /** 43 | * Enable foreign key checks for current db driver. 44 | */ 45 | protected function enableForeignKeys() 46 | { 47 | DB::statement($this->getEnableStatement()); 48 | } 49 | 50 | /** 51 | * Return current driver enable command. 52 | * 53 | * @return mixed 54 | */ 55 | private function getEnableStatement() 56 | { 57 | return $this->getDriverCommands()['enable']; 58 | } 59 | 60 | /** 61 | * Return current driver disable command. 62 | * 63 | * @return mixed 64 | */ 65 | private function getDisableStatement() 66 | { 67 | return $this->getDriverCommands()['disable']; 68 | } 69 | 70 | /** 71 | * Returns command array for current db driver. 72 | * 73 | * @return mixed 74 | */ 75 | private function getDriverCommands() 76 | { 77 | return $this->commands[DB::getDriverName()]; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /database/seeds/TruncateTable.php: -------------------------------------------------------------------------------- 1 | truncate(); 22 | 23 | case 'pgsql': 24 | return DB::statement('TRUNCATE TABLE '.$table.' RESTART IDENTITY CASCADE'); 25 | 26 | case 'sqlite': 27 | return DB::statement('DELETE FROM '.$table); 28 | } 29 | 30 | return false; 31 | } 32 | 33 | /** 34 | * @param array $tables 35 | */ 36 | protected function truncateMultiple(array $tables) 37 | { 38 | foreach ($tables as $table) { 39 | $this->truncate($table); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | disableForeignKeys(); 24 | $this->truncate('users'); 25 | 26 | factory(User::class, 1)->create([ 27 | 'email' => 'admin@admin.com', 28 | 'password' => bcrypt('123456'), 29 | ]); 30 | 31 | $this->enableForeignKeys(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /grumphp.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | git_dir: . 3 | stop_on_failure: true 4 | bin_dir: ./vendor/bin 5 | hooks_dir: ~ 6 | hooks_preset: local 7 | ignore_unstaged_changes: false 8 | hide_circumvention_tip: false 9 | process_async_limit: 10 10 | process_async_wait: 1000 11 | process_timeout: 60 12 | tasks: 13 | #codeception: ~ 14 | composer: ~ 15 | # composer_script: ~ 16 | git_blacklist: 17 | keywords: 18 | - "die(" 19 | - "var_dump(" 20 | - "exit;" 21 | - "dd(" 22 | triggered_by: [php] 23 | git_commit_message: 24 | matchers: 25 | - /BUG-([0-9]*)|FEATURE-([0-9]*)|\W/ 26 | case_insensitive: true 27 | multiline: true 28 | additional_modifiers: '' 29 | # git_conflict: ~ 30 | jsonlint: ~ 31 | # npm_script: ~ 32 | #phpcpd: ~ 33 | phpcs: 34 | standard: PSR2 35 | whitelist_patterns: 36 | - /^src\/vendor\/(.*)/ 37 | - /^src\/tests\/(.*)/ 38 | - /^src\/resources\/(.*)/ 39 | ignore_patterns: [./vendor/*,./tests/*, ./resources/*, ./database/*, ./bootstrap/*] 40 | #phpcsfixer: ~ 41 | #phpcsfixer2: 42 | # config: ~ 43 | # allow_risky: true 44 | #phplint: ~ 45 | #phpmd: 46 | # exclude: [./vendor/*] 47 | # ruleset: ['./phpmdrulesets/cleancode.xml', './phpmdrulesets/codesize.xml', './phpmdrulesets/controversial.xml', './phpmdrulesets/design.xml', './phpmdrulesets/naming.xml','./phpmdrulesets/unusedcode.xml'] 48 | phpparser: ~ 49 | #phpspec: ~ 50 | #phpunit: ~ 51 | #securitychecker: ~ 52 | shell: ~ 53 | xmllint: ~ 54 | yamllint: ~ -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | osType=$(uname) 4 | 5 | if [[ "$osType" == 'Linux' ]]; then 6 | sudo chmod -R 777 ./ 7 | fi 8 | 9 | echo -e "\033[32mCopy .env file...\033[0m" 10 | 11 | php -r "file_exists('.env') || copy('.env.example', '.env');" 12 | echo "-----------------------------------------" 13 | 14 | echo -e "\033[32mNpm version:\033[0m" 15 | npm -v 16 | echo "-----------------------------------------" 17 | 18 | echo -e "\033[32mPHP version:\033[0m" 19 | php -v 20 | echo "-----------------------------------------" 21 | 22 | echo -e "\033[32mCurrent enable PHP Modules:\033[0m" 23 | php -m 24 | echo "-----------------------------------------" 25 | 26 | echo -e "\033[32mStarting install laravel vue spa boilerplate...\033[0m" 27 | Composer install 28 | php artisan install:app 29 | -------------------------------------------------------------------------------- /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 --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19.0", 14 | "browser-sync": "^2.26.7", 15 | "browser-sync-webpack-plugin": "^2.2.2", 16 | "cross-env": "^5.2.0", 17 | "laravel-mix": "^4.1.2", 18 | "normalize-scss": "^7.0.1", 19 | "resolve-url-loader": "^3.1.0", 20 | "sass": "^1.22.7", 21 | "sass-loader": "^7.1.0", 22 | "vue-template-compiler": "^2.6.10" 23 | }, 24 | "dependencies": { 25 | "click-confirm": "^2.1.1", 26 | "js-cookie": "^2.2.0", 27 | "laravel-vue-pagination": "^2.3.0", 28 | "vee-validate": "^2.2.13", 29 | "vue": "^2.6.10", 30 | "vue-range-slider": "^0.6.0", 31 | "vue-router": "^3.0.7", 32 | "vuejs-datepicker": "^1.6.2", 33 | "vuex": "^3.1.1", 34 | "vuex-persistedstate": "^2.5.4" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteCond %{REQUEST_URI} (.+)/$ 11 | RewriteRule ^ %1 [L,R=301] 12 | 13 | # Handle Front Controller... 14 | RewriteCond %{REQUEST_FILENAME} !-d 15 | RewriteCond %{REQUEST_FILENAME} !-f 16 | RewriteRule ^ index.php [L] 17 | 18 | # Handle Authorization Header 19 | RewriteCond %{HTTP:Authorization} . 20 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/fonts/shape1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /public/fonts/tooltip1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/background/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/background/background.jpg -------------------------------------------------------------------------------- /public/images/background/error-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/background/error-bg.jpg -------------------------------------------------------------------------------- /public/images/custom-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/custom-select.png -------------------------------------------------------------------------------- /public/images/error-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/error-bg.jpg -------------------------------------------------------------------------------- /public/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/favicon.ico -------------------------------------------------------------------------------- /public/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/favicon.png -------------------------------------------------------------------------------- /public/images/logo-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/logo-icon-1.png -------------------------------------------------------------------------------- /public/images/logo-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/logo-icon.png -------------------------------------------------------------------------------- /public/images/logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/logo-text.png -------------------------------------------------------------------------------- /public/images/new-favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/new-favicon.ico -------------------------------------------------------------------------------- /public/images/new-logo-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/new-logo-icon.png -------------------------------------------------------------------------------- /public/images/new-logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/new-logo-text.png -------------------------------------------------------------------------------- /public/images/tooltip/Euclid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/tooltip/Euclid.png -------------------------------------------------------------------------------- /public/images/tooltip/shape1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/tooltip/shape2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 9 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /public/images/tooltip/shape3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/images/tooltip/tooltip1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/tooltip/tooltip2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /public/images/tooltip/tooltip3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /public/images/users/599acd6daefc1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/599acd6daefc1.jpg -------------------------------------------------------------------------------- /public/images/users/599ad113ecc33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/599ad113ecc33.jpg -------------------------------------------------------------------------------- /public/images/users/599ad12d61dcb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/599ad12d61dcb.jpg -------------------------------------------------------------------------------- /public/images/users/59a27adf5dd47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/59a27adf5dd47.jpg -------------------------------------------------------------------------------- /public/images/users/59a426a84095b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/59a426a84095b.jpg -------------------------------------------------------------------------------- /public/images/users/59a426d1b817f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/59a426d1b817f.jpg -------------------------------------------------------------------------------- /public/images/users/59a6dac0a47a2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/59a6dac0a47a2.jpg -------------------------------------------------------------------------------- /public/images/users/59f6ba737c2ee.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/59f6ba737c2ee.jpg -------------------------------------------------------------------------------- /public/images/users/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/public/images/users/avatar.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | define('LARAVEL_START', microtime(true)); 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels great to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../vendor/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/style.css": "/css/style.css", 4 | "/js/bundle.min.js": "/js/bundle.min.js" 5 | } -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/assets/images/background/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/background/background.jpg -------------------------------------------------------------------------------- /resources/assets/images/background/error-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/background/error-bg.jpg -------------------------------------------------------------------------------- /resources/assets/images/custom-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/custom-select.png -------------------------------------------------------------------------------- /resources/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/favicon.png -------------------------------------------------------------------------------- /resources/assets/images/logo-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/logo-icon.png -------------------------------------------------------------------------------- /resources/assets/images/logo-light-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/logo-light-icon.png -------------------------------------------------------------------------------- /resources/assets/images/logo-light-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/logo-light-text.png -------------------------------------------------------------------------------- /resources/assets/images/logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/logo-text.png -------------------------------------------------------------------------------- /resources/assets/images/tooltip/Euclid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/tooltip/Euclid.png -------------------------------------------------------------------------------- /resources/assets/images/tooltip/shape1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /resources/assets/images/tooltip/shape2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 9 | 11 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /resources/assets/images/tooltip/shape3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /resources/assets/images/tooltip/tooltip1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /resources/assets/images/tooltip/tooltip2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/images/tooltip/tooltip3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/images/users/john.doe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devmad119/laravel-vue-spa-boilerplate/e3643428923e2b136767bdaee25db48f99e808cb/resources/assets/images/users/john.doe.jpg -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | import store from './store' 10 | import router from './routes' 11 | 12 | /** 13 | * Next, we will create a fresh Vue application instance and attach it to 14 | * the page. Then, you may begin adding components to this application 15 | * or customize the JavaScript scaffolding to fit your unique needs. 16 | */ 17 | 18 | const app = new Vue({ 19 | el: '#root', 20 | store, 21 | router 22 | }); 23 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import axios from 'axios' 4 | import Form from './services/form' 5 | 6 | window.Vue = Vue; 7 | Vue.use(VueRouter); 8 | window.axios = axios; 9 | window.Form = Form; 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | window.axios.defaults.headers.common['Authorization'] = 'Bearer ' + localStorage.getItem('auth_token'); 13 | 14 | /** 15 | * Next we will register the CSRF Token as a common header with Axios so that 16 | * all outgoing HTTP requests automatically have it attached. This is just 17 | * a simple convenience so we don't have to attach every token manually. 18 | */ 19 | 20 | let token = document.head.querySelector('meta[name="csrf-token"]'); 21 | 22 | if (token) { 23 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 24 | } else { 25 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 26 | } 27 | 28 | /** 29 | * Echo exposes an expressive API for subscribing to channels and listening 30 | * for events that are broadcast by Laravel. Echo and event broadcasting 31 | * allows your team to easily build robust real-time web applications. 32 | */ 33 | 34 | // import Echo from 'laravel-echo' 35 | 36 | // window.Pusher = require('pusher-js'); 37 | 38 | // window.Echo = new Echo({ 39 | // broadcaster: 'pusher', 40 | // key: 'your-pusher-key' 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/assets/js/layouts/error-page.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/js/layouts/footer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/js/layouts/guest-footer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/assets/js/layouts/guest-page.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/js/layouts/right-sidebar.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /resources/assets/js/services/errors.js: -------------------------------------------------------------------------------- 1 | class Errors { 2 | /** 3 | * Create a new Errors instance. 4 | */ 5 | constructor() { 6 | this.errors = {}; 7 | } 8 | 9 | 10 | /** 11 | * Determine if an errors exists for the given field. 12 | * 13 | * @param {string} field 14 | */ 15 | has(field) { 16 | return this.errors.hasOwnProperty(field); 17 | } 18 | 19 | 20 | /** 21 | * Determine if we have any errors. 22 | */ 23 | any() { 24 | return Object.keys(this.errors).length > 0; 25 | } 26 | 27 | 28 | /** 29 | * Retrieve the error message for a field. 30 | * 31 | * @param {string} field 32 | */ 33 | get(field) { 34 | if (this.errors[field]) { 35 | return this.errors[field][0]; 36 | } 37 | } 38 | 39 | 40 | /** 41 | * Record the new errors. 42 | * 43 | * @param {object} errors 44 | */ 45 | record(errors) { 46 | this.errors = errors; 47 | } 48 | 49 | 50 | /** 51 | * Clear one or all error fields. 52 | * 53 | * @param {string|null} field 54 | */ 55 | clear(field) { 56 | if (field) { 57 | delete this.errors[field]; 58 | 59 | return; 60 | } 61 | 62 | this.errors = {}; 63 | } 64 | } 65 | 66 | export default Errors; -------------------------------------------------------------------------------- /resources/assets/js/services/helper.js: -------------------------------------------------------------------------------- 1 | export default { 2 | logout(){ 3 | return axios.post('/api/v1/auth/logout').then(response => { 4 | localStorage.removeItem('auth_token'); 5 | axios.defaults.headers.common['Authorization'] = null; 6 | toastr['success'](response.data.message); 7 | }).catch(error => { 8 | console.log(error); 9 | }); 10 | }, 11 | 12 | authUser(){ 13 | return axios.get('/api/v1/auth/user').then(response => { 14 | return response.data; 15 | }).catch(error => { 16 | return error.response.data; 17 | }); 18 | }, 19 | 20 | check(){ 21 | return axios.post('/api/v1/auth/check').then(response => { 22 | return !!response.data.authenticated; 23 | }).catch(error =>{ 24 | return response.data.authenticated; 25 | }); 26 | }, 27 | 28 | getFilterURL(data){ 29 | let url = ''; 30 | $.each(data, function(key,value) { 31 | url += (value) ? '&'+key+'='+encodeURI(value) : ''; 32 | }); 33 | return url; 34 | }, 35 | 36 | formAssign(form, data){ 37 | for (let key of Object.keys(form)) { 38 | if(key !== "originalData" && key !== "errors" && key !== "autoReset"){ 39 | form[key] = data[key]; 40 | } 41 | } 42 | return form; 43 | }, 44 | 45 | taskColor(value){ 46 | let classes = ['progress-bar','progress-bar-striped']; 47 | if(value < 20) 48 | classes.push('bg-danger'); 49 | else if(value < 50) 50 | classes.push('bg-warning'); 51 | else if(value < 80) 52 | classes.push('bg-info'); 53 | else 54 | classes.push('bg-success'); 55 | return classes; 56 | }, 57 | 58 | formatDate(date){ 59 | if(!date) 60 | return; 61 | 62 | return moment(date).format('MMMM Do YYYY'); 63 | }, 64 | 65 | formatDateTime(date){ 66 | if(!date) 67 | return; 68 | 69 | return moment(date).format('MMMM Do YYYY h:mm a'); 70 | }, 71 | 72 | ucword(value){ 73 | if(!value) 74 | return; 75 | 76 | return value.toLowerCase().replace(/\b[a-z]/g, function(value) { 77 | return value.toUpperCase(); 78 | }); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /resources/assets/js/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | Vue.use(Vuex); 4 | import createPersistedState from 'vuex-persistedstate' 5 | import * as Cookies from 'js-cookie' 6 | 7 | const store = new Vuex.Store({ 8 | state: { 9 | auth: { 10 | first_name: '', 11 | last_name: '', 12 | email: '', 13 | avatar: '' 14 | }, 15 | config: { 16 | company_name: '', 17 | contact_person: '' 18 | } 19 | }, 20 | mutations: { 21 | setAuthUserDetail (state, auth) { 22 | for (let key of Object.keys(auth)) { 23 | state.auth[key] = auth[key]; 24 | } 25 | if ('avatar' in auth) 26 | state.auth.avatar = auth.avatar !== null ? auth.avatar : 'avatar.png'; 27 | }, 28 | resetAuthUserDetail (state) { 29 | for (let key of Object.keys(state.auth)) { 30 | state.auth[key] = ''; 31 | } 32 | }, 33 | setConfig (state, config) { 34 | for (let key of Object.keys(config)) { 35 | state.config[key] = config[key]; 36 | } 37 | } 38 | }, 39 | actions: { 40 | setAuthUserDetail ({ commit }, auth) { 41 | commit('setAuthUserDetail',auth); 42 | }, 43 | resetAuthUserDetail ({commit}){ 44 | commit('resetAuthUserDetail'); 45 | }, 46 | setConfig ({ commit }, data) { 47 | commit('setConfig',data); 48 | } 49 | }, 50 | getters: { 51 | getAuthUser: (state) => (name) => { 52 | return state.auth[name]; 53 | }, 54 | getAuthUserFullName: (state) => { 55 | return state.auth['first_name']+' '+state.auth['last_name']; 56 | }, 57 | getConfig: (state) => (name) => { 58 | return state.config[name]; 59 | }, 60 | }, 61 | plugins: [ 62 | createPersistedState({ storage: window.sessionStorage }) 63 | ] 64 | }); 65 | 66 | export default store; -------------------------------------------------------------------------------- /resources/assets/js/views/auth/activate.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /resources/assets/js/views/auth/password.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 59 | -------------------------------------------------------------------------------- /resources/assets/js/views/auth/social-auth.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 43 | -------------------------------------------------------------------------------- /resources/assets/js/views/errors/page-not-found.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /resources/assets/js/views/pages/blank.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 30 | -------------------------------------------------------------------------------- /resources/assets/js/views/task/edit.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | -------------------------------------------------------------------------------- /resources/assets/js/views/user/edit.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /resources/assets/plugins/bootstrap/sass/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | padding: $alert-padding-y $alert-padding-x; 7 | margin-bottom: $alert-margin-bottom; 8 | border: $alert-border-width solid transparent; 9 | @include border-radius($alert-border-radius); 10 | } 11 | 12 | // Headings for larger alerts 13 | .alert-heading { 14 | // Specified to prevent conflicts of changing $headings-color 15 | color: inherit; 16 | } 17 | 18 | // Provide class for links that match alerts 19 | .alert-link { 20 | font-weight: $alert-link-font-weight; 21 | } 22 | 23 | 24 | // Dismissible alerts 25 | // 26 | // Expand the right padding and account for the close button's positioning. 27 | 28 | .alert-dismissible { 29 | // Adjust close link position 30 | .close { 31 | position: relative; 32 | top: -$alert-padding-y; 33 | right: -$alert-padding-x; 34 | padding: $alert-padding-y $alert-padding-x; 35 | color: inherit; 36 | } 37 | } 38 | 39 | 40 | // Alternate styles 41 | // 42 | // Generate contextual modifier classes for colorizing the alert. 43 | 44 | @each $color, $value in $theme-colors { 45 | .alert-#{$color} { 46 | @include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /resources/assets/plugins/bootstrap/sass/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | color: $badge-color; 13 | text-align: center; 14 | white-space: nowrap; 15 | vertical-align: baseline; 16 | @include border-radius(); 17 | 18 | // Empty badges collapse automatically 19 | &:empty { 20 | display: none; 21 | } 22 | } 23 | 24 | // Quick fix for badges in buttons 25 | .btn .badge { 26 | position: relative; 27 | top: -1px; 28 | } 29 | 30 | // Pill badges 31 | // 32 | // Make them extra rounded with a modifier to replace v3's badges. 33 | 34 | .badge-pill { 35 | padding-right: $badge-pill-padding-x; 36 | padding-left: $badge-pill-padding-x; 37 | @include border-radius($badge-pill-border-radius); 38 | } 39 | 40 | // Colors 41 | // 42 | // Contextual variations (linked badges get darker on :hover). 43 | 44 | @each $color, $value in $theme-colors { 45 | .badge-#{$color} { 46 | @include badge-variant($value); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /resources/assets/plugins/bootstrap/sass/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 3 | margin-bottom: $breadcrumb-margin-bottom; 4 | list-style: none; 5 | background-color: $breadcrumb-bg; 6 | @include border-radius($border-radius); 7 | @include clearfix; 8 | } 9 | 10 | .breadcrumb-item { 11 | float: left; 12 | 13 | // The separator between breadcrumbs (by default, a forward-slash: "/") 14 | + .breadcrumb-item::before { 15 | display: inline-block; // Suppress underlining of the separator in modern browsers 16 | padding-right: $breadcrumb-item-padding; 17 | padding-left: $breadcrumb-item-padding; 18 | color: $breadcrumb-divider-color; 19 | content: "#{$breadcrumb-divider}"; 20 | } 21 | 22 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 23 | // without `