├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Console │ ├── Commands │ │ ├── BuildDev.php │ │ ├── BuildInstall.php │ │ ├── BuildProd.php │ │ └── BuildWatch.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── AdminController.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ └── ResetPasswordController.php │ │ └── Controller.php │ ├── Kernel.php │ └── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ └── VerifyCsrfToken.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ └── 2014_10_12_100000_create_password_resets_table.php └── seeds │ └── DatabaseSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── assets │ └── .gitkeep ├── favicon.ico ├── index.php ├── robots.txt └── web.config ├── resources ├── assets │ └── frontend │ │ ├── .babelrc │ │ ├── .editorconfig │ │ ├── .eslintignore │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── backers.md │ │ ├── build │ │ ├── build.dev.js │ │ ├── build.js │ │ ├── check-versions.js │ │ ├── dev-client.js │ │ ├── dev-server.js │ │ ├── utils.js │ │ ├── vue-loader.conf.js │ │ ├── watch.js │ │ ├── webpack.base.conf.js │ │ ├── webpack.dev.conf.js │ │ └── webpack.prod.conf.js │ │ ├── client │ │ ├── App.vue │ │ ├── app.js │ │ ├── assets │ │ │ ├── logo.png │ │ │ ├── logo.svg │ │ │ └── logo@2x.png │ │ ├── components │ │ │ └── layout │ │ │ │ ├── AppMain.vue │ │ │ │ ├── FooterBar.vue │ │ │ │ ├── Levelbar.vue │ │ │ │ ├── Navbar.vue │ │ │ │ ├── Sidebar.vue │ │ │ │ └── index.js │ │ ├── filters │ │ │ └── index.js │ │ ├── index.js │ │ ├── router │ │ │ └── index.js │ │ ├── store │ │ │ ├── actions.js │ │ │ ├── getters.js │ │ │ ├── index.js │ │ │ ├── modules │ │ │ │ ├── app.js │ │ │ │ └── menu │ │ │ │ │ ├── charts.js │ │ │ │ │ ├── components.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lazyLoading.js │ │ │ │ │ ├── tables.js │ │ │ │ │ └── uifeatures.js │ │ │ └── mutation-types.js │ │ └── views │ │ │ ├── Home.vue │ │ │ ├── axios │ │ │ └── index.vue │ │ │ ├── charts │ │ │ ├── Chartist.vue │ │ │ ├── Chartjs.vue │ │ │ ├── Peity.vue │ │ │ ├── Plotly.vue │ │ │ └── index.vue │ │ │ ├── components │ │ │ ├── BackToTop.vue │ │ │ ├── Brace.vue │ │ │ ├── Collapse.vue │ │ │ ├── Datepicker.vue │ │ │ ├── Default.vue │ │ │ ├── Emoji.vue │ │ │ ├── Lory.vue │ │ │ ├── Message.vue │ │ │ ├── Modal.vue │ │ │ ├── Notification.vue │ │ │ ├── ProgressBar.vue │ │ │ ├── ProgressTracker.vue │ │ │ ├── Quill.vue │ │ │ ├── Rating.vue │ │ │ ├── Slider.vue │ │ │ ├── Switch.vue │ │ │ ├── Tabs.vue │ │ │ ├── Tooltip.vue │ │ │ ├── index.vue │ │ │ └── modals │ │ │ │ ├── CardModal.vue │ │ │ │ ├── ImageModal.vue │ │ │ │ └── Modal.vue │ │ │ ├── dashboard │ │ │ └── index.vue │ │ │ ├── tables │ │ │ └── Basic.vue │ │ │ └── ui │ │ │ ├── Buttons.vue │ │ │ ├── Form.vue │ │ │ ├── Icons.vue │ │ │ └── Typography.vue │ │ ├── config │ │ ├── dev.env.js │ │ ├── index.js │ │ ├── prod.env.js │ │ └── test.env.js │ │ ├── doc │ │ ├── charts.md │ │ ├── components.md │ │ ├── dependencies.md │ │ └── development.md │ │ ├── electronIndex.js │ │ ├── index.html │ │ ├── package.json │ │ ├── screenshots │ │ ├── app.png │ │ └── preview.jpg │ │ └── yarn.lock ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── index.blade.php │ └── layouts │ └── app.example.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 /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_KEY= 3 | APP_DEBUG=true 4 | APP_LOG_LEVEL=debug 5 | APP_URL=http://localhost 6 | 7 | DB_CONNECTION=mysql 8 | DB_HOST=127.0.0.1 9 | DB_PORT=3306 10 | DB_DATABASE=homestead 11 | DB_USERNAME=homestead 12 | DB_PASSWORD=secret 13 | 14 | BROADCAST_DRIVER=log 15 | CACHE_DRIVER=file 16 | SESSION_DRIVER=file 17 | QUEUE_DRIVER=sync 18 | 19 | REDIS_HOST=127.0.0.1 20 | REDIS_PASSWORD=null 21 | REDIS_PORT=6379 22 | 23 | MAIL_DRIVER=smtp 24 | MAIL_HOST=mailtrap.io 25 | MAIL_PORT=2525 26 | MAIL_USERNAME=null 27 | MAIL_PASSWORD=null 28 | MAIL_ENCRYPTION=null 29 | 30 | PUSHER_APP_ID= 31 | PUSHER_APP_KEY= 32 | PUSHER_APP_SECRET= 33 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/storage 3 | /public/hot 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | Homestead.json 8 | Homestead.yaml 9 | .env 10 | _ide_helper\.php 11 | \.phpstorm\.meta\.php 12 | public/logo.png 13 | public/app.js 14 | public/vendor.js 15 | public/assets/fonts 16 | public/assets/img 17 | public/assets/js 18 | public/assets/css 19 | resources/assets/frontend/dist 20 | resources/assets/frontend/node_modules 21 | resources/views/layouts/app.blade.php 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel vue-admin integration example 2 | 3 | The web admin frontend uses the [vue-admin](https://github.com/vue-bulma/vue-admin) package. 4 | If the frontend symlinking fails on windows you have to run it as Administrator or [set the symlink permission](https://superuser.com/questions/124679/how-do-i-create-a-link-in-windows-7-home-premium-as-a-regular-user) 5 | 6 | ## Building 7 | 8 | Before you run build:watch you have to run build:dev or build:prod to create the symlinks. If you are using windows, you have to run it as administrator. 9 | 10 | Frontend build commands: 11 | - ```php artisan build:install``` install the frontend dependencies 12 | - ```php artisan build:dev``` builds the frontend in dev mode 13 | - ```php artisan build:watch``` builds the frontend in dev mode, and watches the filesystem for changes 14 | - ```php artisan build:prod``` builds the frontend in production mode 15 | 16 | ## Developing the frontend 17 | 18 | The frontend root folder is ```resources/assets/frontend```. In this folder you can find the complete vue-admin package. If you want to make changes to the frontend 19 | you have to work in this folder. 20 | 21 | The frontend is buildable alone. You can find more info in the ```resources/assets/frontend/package.json```. 22 | -------------------------------------------------------------------------------- /app/Console/Commands/BuildDev.php: -------------------------------------------------------------------------------- 1 | info('Building frontend'); 44 | $process = new Process('npm run build-dev'); 45 | $process->setTimeout(null); 46 | $process->run(function ($type, $buffer) { 47 | if (Process::ERR === $type) { 48 | $this->error($buffer); 49 | } else { 50 | $this->info($buffer); 51 | } 52 | }); 53 | $this->info('Linking..'); 54 | 55 | // Symlink folders 56 | $res = [ 57 | 'assets' . DIRECTORY_SEPARATOR .'css', 58 | 'assets' . DIRECTORY_SEPARATOR .'img', 59 | 'assets' . DIRECTORY_SEPARATOR .'js', 60 | 'assets' . DIRECTORY_SEPARATOR .'fonts', 61 | 'logo.png', 62 | 'app.js', 63 | 'vendor.js', 64 | ]; 65 | 66 | foreach ($res as $entry) { 67 | $target = resource_path('assets' . DIRECTORY_SEPARATOR .'frontend' . DIRECTORY_SEPARATOR . 'dist' . DIRECTORY_SEPARATOR . $entry); 68 | $link = public_path($entry); 69 | $this->info('Creating symlink. Target: ' . $target . ' Link: ' . $link); 70 | if (file_exists($target) && !file_exists($link)) { 71 | try{ 72 | if(!symlink($target, $link)){ 73 | $this->error('Symlink creation failed!'); 74 | } 75 | } catch(Exception $exception){ 76 | $this->error('Symlink creation failed! Cause: ' . $exception->getMessage() .' You have to link manually:'); 77 | $this->error('ln -s ' . $target . ' ' . $link); 78 | } 79 | } else { 80 | $this->info('Symlink creation skipped. Target exists: ' . (file_exists($target) ? 'true' : 'false') 81 | . ' Link exists: ' . (file_exists($link) ? 'true' : 'false') ); 82 | } 83 | } 84 | 85 | $index = file_get_contents(resource_path('assets' . DIRECTORY_SEPARATOR .'frontend' . DIRECTORY_SEPARATOR .'dist' . DIRECTORY_SEPARATOR .'index.html')); 86 | $index = str_replace('', 87 | ' 88 | 89 | 90 | 93 | 94 | ', $index); 95 | 96 | $appBladePath = resource_path('views' . DIRECTORY_SEPARATOR .'layouts' . DIRECTORY_SEPARATOR .'app.blade.php'); 97 | $this->info('Removing ' . $appBladePath); 98 | 99 | if(file_exists($appBladePath)){ 100 | if(!unlink($appBladePath)){ 101 | $this->error('Error removing ' . $appBladePath); 102 | return; 103 | } 104 | } 105 | 106 | $this->info('Writing app.blade.php...'); 107 | // $this->info($index); 108 | file_put_contents($appBladePath, $index); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /app/Console/Commands/BuildInstall.php: -------------------------------------------------------------------------------- 1 | info('installing frontend dependencies'); 43 | $process = new Process('npm install'); 44 | $process->setTimeout(null); 45 | $process->run(function ($type, $buffer) { 46 | if (Process::ERR === $type) { 47 | $this->error($buffer); 48 | } else { 49 | $this->info($buffer); 50 | } 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Console/Commands/BuildProd.php: -------------------------------------------------------------------------------- 1 | info('Building frontend'); 44 | $process = new Process('npm run build'); 45 | $process->setTimeout(null); 46 | $process->run(function ($type, $buffer) { 47 | if (Process::ERR === $type) { 48 | $this->error($buffer); 49 | } else { 50 | $this->info($buffer); 51 | } 52 | }); 53 | $this->info('Linking..'); 54 | 55 | // Symlink folders 56 | $res = [ 57 | 'assets' . DIRECTORY_SEPARATOR .'css', 58 | 'assets' . DIRECTORY_SEPARATOR .'img', 59 | 'assets' . DIRECTORY_SEPARATOR .'js', 60 | 'assets' . DIRECTORY_SEPARATOR .'fonts', 61 | 'logo.png' 62 | ]; 63 | 64 | foreach ($res as $entry) { 65 | $target = resource_path('assets' . DIRECTORY_SEPARATOR .'frontend' . DIRECTORY_SEPARATOR . 'dist' . DIRECTORY_SEPARATOR . $entry); 66 | $link = public_path($entry); 67 | $this->info('Creating symlink. Target: ' . $target . ' Link: ' . $link); 68 | if (file_exists($target) && !file_exists($link)) { 69 | try{ 70 | if(!symlink($target, $link)){ 71 | $this->error('Symlink creation failed!'); 72 | } 73 | } catch(Exception $exception){ 74 | $this->error('Symlink creation failed! Cause: ' . $exception->getMessage() .' You have to link manually:'); 75 | $this->error('ln -s ' . $target . ' ' . $link); 76 | } 77 | } else { 78 | $this->info('Symlink creation skipped. Target exists: ' . (file_exists($target) ? 'true' : 'false') 79 | . ' Link exists: ' . (file_exists($link) ? 'true' : 'false') ); 80 | } 81 | } 82 | 83 | $index = file_get_contents(resource_path('assets' . DIRECTORY_SEPARATOR .'frontend' . DIRECTORY_SEPARATOR .'dist' . DIRECTORY_SEPARATOR .'index.html')); 84 | $index = str_replace('', 85 | ' 86 | 87 | 88 | 91 | 92 | ', $index); 93 | 94 | $appBladePath = resource_path('views' . DIRECTORY_SEPARATOR .'layouts' . DIRECTORY_SEPARATOR .'app.blade.php'); 95 | $this->info('Removing ' . $appBladePath); 96 | 97 | if(file_exists($appBladePath)){ 98 | if(!unlink($appBladePath)){ 99 | $this->error('Error removing ' . $appBladePath); 100 | return; 101 | } 102 | } 103 | 104 | $this->info('Writing app.blade.php...'); 105 | // $this->info($index); 106 | file_put_contents($appBladePath, $index); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/Console/Commands/BuildWatch.php: -------------------------------------------------------------------------------- 1 | info('Copy app.example.blade.php to resources/views/layouts/app.example.blade.php'); 45 | copy(resource_path('views' . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . 'app.example.blade.php'), 46 | resource_path('views' . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . 'app.blade.php')); 47 | 48 | $this->info('Watching frontend'); 49 | 50 | $process = new Process('npm run watch'); 51 | $process->setTimeout(null); 52 | $process->run(function ($type, $buffer) { 53 | if (Process::ERR === $type) { 54 | $this->error($buffer); 55 | } else { 56 | $this->info($buffer); 57 | } 58 | }); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 35 | // ->hourly(); 36 | } 37 | 38 | /** 39 | * Register the Closure based commands for the application. 40 | * 41 | * @return void 42 | */ 43 | protected function commands() 44 | { 45 | require base_path('routes/console.php'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 60 | return response()->json(['error' => 'Unauthenticated.'], 401); 61 | } 62 | 63 | return redirect()->guest(route('login')); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdminController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'logout']); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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|max:255', 52 | 'email' => 'required|email|max:255|unique:users', 53 | 'password' => 'required|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | [ 30 | \App\Http\Middleware\EncryptCookies::class, 31 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 32 | \Illuminate\Session\Middleware\StartSession::class, 33 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 34 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 35 | \App\Http\Middleware\VerifyCsrfToken::class, 36 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 37 | ], 38 | 39 | 'api' => [ 40 | 'throttle:60,1', 41 | 'bindings', 42 | ], 43 | ]; 44 | 45 | /** 46 | * The application's route middleware. 47 | * 48 | * These middleware may be assigned to groups or used individually. 49 | * 50 | * @var array 51 | */ 52 | protected $routeMiddleware = [ 53 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 54 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 55 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 56 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 57 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 58 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 59 | ]; 60 | } 61 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.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 | [ 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/User.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /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/autoload.php: -------------------------------------------------------------------------------- 1 | =5.6.4", 9 | "laravel/framework": "5.4.*", 10 | "laravel/tinker": "~1.0" 11 | }, 12 | "require-dev": { 13 | "fzaninotto/faker": "~1.4", 14 | "mockery/mockery": "0.9.*", 15 | "phpunit/phpunit": "~5.7" 16 | }, 17 | "autoload": { 18 | "classmap": [ 19 | "database" 20 | ], 21 | "psr-4": { 22 | "App\\": "app/" 23 | } 24 | }, 25 | "autoload-dev": { 26 | "psr-4": { 27 | "Tests\\": "tests/" 28 | } 29 | }, 30 | "scripts": { 31 | "post-root-package-install": [ 32 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 33 | ], 34 | "post-create-project-cmd": [ 35 | "php artisan key:generate" 36 | ], 37 | "post-install-cmd": [ 38 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 39 | "php artisan optimize" 40 | ], 41 | "post-update-cmd": [ 42 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 43 | "php artisan optimize" 44 | ] 45 | }, 46 | "config": { 47 | "preferred-install": "dist", 48 | "sort-packages": true 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /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 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /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/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /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 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'charset' => 'utf8mb4', 50 | 'collation' => 'utf8mb4_unicode_ci', 51 | 'prefix' => '', 52 | 'strict' => true, 53 | 'engine' => null, 54 | ], 55 | 56 | 'pgsql' => [ 57 | 'driver' => 'pgsql', 58 | 'host' => env('DB_HOST', '127.0.0.1'), 59 | 'port' => env('DB_PORT', '5432'), 60 | 'database' => env('DB_DATABASE', 'forge'), 61 | 'username' => env('DB_USERNAME', 'forge'), 62 | 'password' => env('DB_PASSWORD', ''), 63 | 'charset' => 'utf8', 64 | 'prefix' => '', 65 | 'schema' => 'public', 66 | 'sslmode' => 'prefer', 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Migration Repository Table 74 | |-------------------------------------------------------------------------- 75 | | 76 | | This table keeps track of all the migrations that have already run for 77 | | your application. Using this information, we can determine which of 78 | | the migrations on disk haven't actually been run in the database. 79 | | 80 | */ 81 | 82 | 'migrations' => 'migrations', 83 | 84 | /* 85 | |-------------------------------------------------------------------------- 86 | | Redis Databases 87 | |-------------------------------------------------------------------------- 88 | | 89 | | Redis is an open source, fast, and advanced key-value store that also 90 | | provides a richer set of commands than a typical key-value systems 91 | | such as APC or Memcached. Laravel makes it easy to dig right in. 92 | | 93 | */ 94 | 95 | 'redis' => [ 96 | 97 | 'client' => 'predis', 98 | 99 | 'default' => [ 100 | 'host' => env('REDIS_HOST', '127.0.0.1'), 101 | 'password' => env('REDIS_PASSWORD', null), 102 | 'port' => env('REDIS_PORT', 6379), 103 | 'database' => 0, 104 | ], 105 | 106 | ], 107 | 108 | ]; 109 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | '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' => '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/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 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 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/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/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 16 | static $password; 17 | 18 | return [ 19 | 'name' => $faker->name, 20 | 'email' => $faker->unique()->safeEmail, 21 | 'password' => $password ?: $password = bcrypt('secret'), 22 | 'remember_token' => str_random(10), 23 | ]; 24 | }); 25 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 5 | "watch": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch-poll": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "hot": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 8 | "production": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 9 | }, 10 | "devDependencies": { 11 | "axios": "^0.15.3", 12 | "bootstrap-sass": "^3.3.7", 13 | "jquery": "^3.1.1", 14 | "laravel-mix": "^0.8.1", 15 | "lodash": "^4.17.4", 16 | "vue": "^2.1.10" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /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 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/public/assets/.gitkeep -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 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 nice to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/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/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/assets/frontend/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { "modules": false }], 4 | "stage-2" 5 | ], 6 | "plugins": [ 7 | "transform-export-extensions" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /resources/assets/frontend/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /resources/assets/frontend/.eslintignore: -------------------------------------------------------------------------------- 1 | build/build.js 2 | -------------------------------------------------------------------------------- /resources/assets/frontend/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | parserOptions: { 5 | sourceType: 'module' 6 | }, 7 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 8 | extends: 'standard', 9 | // required to lint *.vue files 10 | plugins: [ 11 | 'html' 12 | ], 13 | // add your custom rules here 14 | 'rules': { 15 | // allow paren-less arrow functions 16 | 'arrow-parens': 0, 17 | // allow async-await 18 | 'generator-star-spacing': 0, 19 | // allow debugger during development 20 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /resources/assets/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | yarn-error.log 6 | selenium-debug.log 7 | test/unit/coverage 8 | test/e2e/reports 9 | -------------------------------------------------------------------------------- /resources/assets/frontend/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "5" 5 | - "6" 6 | 7 | before_install: 8 | - npm install npm@latest -g 9 | 10 | script: 11 | - node --version 12 | - npm --version 13 | - npm run build 14 | -------------------------------------------------------------------------------- /resources/assets/frontend/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Fangdun Cai (fundon.me) 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /resources/assets/frontend/appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | matrix: 3 | - nodejs_version: '4' 4 | - nodejs_version: '5' 5 | - nodejs_version: '6' 6 | 7 | install: 8 | - ps: Install-Product node $env:nodejs_version 9 | - npm install npm@latest -g 10 | - npm install 11 | 12 | test_script: 13 | - node --version 14 | - npm --version 15 | - npm run build 16 | 17 | build: off 18 | 19 | version: "{build}" 20 | -------------------------------------------------------------------------------- /resources/assets/frontend/backers.md: -------------------------------------------------------------------------------- 1 | # Backers 2 | 3 | Thank you for your supports! 4 | 5 | * [Thomas_Leong](https://www.patreon.com/user/creators?u=5244543) 6 | 7 | * [wen](https://www.patreon.com/user/creators?u=5239734) 8 | 9 | * [Joris Vanhecke](https://www.patreon.com/user/creators?u=5145359) 10 | 11 | * [datastream](https://www.patreon.com/user/creators?u=4315833) 12 | 13 | * [Lê Chương](https://www.patreon.com/user/creators?u=3495305) 14 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/build.dev.js: -------------------------------------------------------------------------------- 1 | // https://github.com/shelljs/shelljs 2 | 'use strict' 3 | 4 | require('./check-versions')() 5 | require('shelljs/global') 6 | 7 | env.NODE_ENV = 'development' 8 | 9 | const ora = require('ora') 10 | const merge = require('webpack-merge') 11 | const path = require('path') 12 | const chalk = require('chalk') 13 | const webpack = require('webpack') 14 | const config = require('../config') 15 | const webpackConfig = require('./webpack.dev.conf') 16 | const utils = require('./utils') 17 | 18 | const spinner = ora('building for development...') 19 | spinner.start() 20 | 21 | const assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory) 22 | rm('-rf', assetsPath) 23 | mkdir('-p', assetsPath) 24 | cp('-R', 'assets/*', assetsPath) 25 | 26 | const compiler = webpack(merge(webpackConfig, { 27 | output: { 28 | filename: utils.assetsPath('js/[name].js'), 29 | chunkFilename: utils.assetsPath('js/[id].js') 30 | } 31 | })) 32 | const ProgressPlugin = require('webpack/lib/ProgressPlugin') 33 | compiler.apply(new ProgressPlugin()) 34 | 35 | compiler.run((err, stats) => { 36 | spinner.stop() 37 | if (err) throw err 38 | process.stdout.write(stats.toString({ 39 | colors: true, 40 | modules: false, 41 | children: false, 42 | chunks: false, 43 | chunkModules: false 44 | }) + '\n\n') 45 | 46 | console.log(chalk.cyan(' Build complete.\n')) 47 | console.log(chalk.yellow( 48 | ' Tip: built files are meant to be served over an HTTP server.\n' + 49 | ' Opening index.html over file:// won\'t work.\n' 50 | )) 51 | }) 52 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/build.js: -------------------------------------------------------------------------------- 1 | // https://github.com/shelljs/shelljs 2 | 'use strict' 3 | 4 | require('./check-versions')() 5 | require('shelljs/global') 6 | 7 | env.NODE_ENV = 'production' 8 | 9 | const ora = require('ora') 10 | const path = require('path') 11 | const chalk = require('chalk') 12 | const webpack = require('webpack') 13 | const config = require('../config') 14 | const webpackConfig = require('./webpack.prod.conf') 15 | 16 | const spinner = ora('building for production...') 17 | spinner.start() 18 | 19 | const assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory) 20 | rm('-rf', assetsPath) 21 | mkdir('-p', assetsPath) 22 | cp('-R', 'assets/*', assetsPath) 23 | 24 | const compiler = webpack(webpackConfig) 25 | const ProgressPlugin = require('webpack/lib/ProgressPlugin') 26 | compiler.apply(new ProgressPlugin()) 27 | 28 | compiler.run((err, stats) => { 29 | spinner.stop() 30 | if (err) throw err 31 | process.stdout.write(stats.toString({ 32 | colors: true, 33 | modules: false, 34 | children: false, 35 | chunks: false, 36 | chunkModules: false 37 | }) + '\n\n') 38 | 39 | console.log(chalk.cyan(' Build complete.\n')) 40 | console.log(chalk.yellow( 41 | ' Tip: built files are meant to be served over an HTTP server.\n' + 42 | ' Opening index.html over file:// won\'t work.\n' 43 | )) 44 | }) 45 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const chalk = require('chalk') 4 | const semver = require('semver') 5 | const packageConfig = require('../package.json') 6 | 7 | const exec = (cmd) => { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | }, 17 | { 18 | name: 'npm', 19 | currentVersion: exec('npm --version'), 20 | versionRequirement: packageConfig.engines.npm 21 | } 22 | ] 23 | 24 | module.exports = () => { 25 | const warnings = [] 26 | for (let i = 0; i < versionRequirements.length; i++) { 27 | const mod = versionRequirements[i] 28 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 29 | warnings.push(mod.name + ': ' + 30 | chalk.red(mod.currentVersion) + ' should be ' + 31 | chalk.green(mod.versionRequirement) 32 | ) 33 | } 34 | } 35 | 36 | if (warnings.length) { 37 | console.log('') 38 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 39 | console.log() 40 | for (let i = 0; i < warnings.length; i++) { 41 | const warning = warnings[i] 42 | console.log(' ' + warning) 43 | } 44 | console.log() 45 | process.exit(1) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/dev-client.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* eslint-disable */ 4 | require('eventsource-polyfill') 5 | const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 6 | 7 | hotClient.subscribe(event => { 8 | if (event.action === 'reload') { 9 | window.location.reload() 10 | } 11 | }) 12 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/dev-server.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | require('./check-versions')() 4 | 5 | const path = require('path') 6 | const express = require('express') 7 | const webpack = require('webpack') 8 | const opn = require('opn') 9 | const config = require('../config') 10 | const proxyMiddleware = require('http-proxy-middleware') 11 | const webpackConfig = process.env.NODE_ENV === 'testing' 12 | ? require('./webpack.prod.conf') 13 | : require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | const port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | const autoOpenBrowser = Boolean(config.dev.autoOpenBrowser) 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | const proxyTable = config.dev.proxyTable 22 | 23 | const app = express() 24 | const compiler = webpack(webpackConfig) 25 | 26 | const devMiddleware = require('webpack-dev-middleware')(compiler, { 27 | publicPath: webpackConfig.output.publicPath, 28 | stats: { 29 | colors: true, 30 | chunks: false 31 | } 32 | }) 33 | 34 | const hotMiddleware = require('webpack-hot-middleware')(compiler) 35 | // force page reload when html-webpack-plugin template changes 36 | compiler.plugin('compilation', compilation => { 37 | compilation.plugin('html-webpack-plugin-after-emit', (data, cb) => { 38 | hotMiddleware.publish({ action: 'reload' }) 39 | cb() 40 | }) 41 | }) 42 | 43 | // proxy api requests 44 | Object.keys(proxyTable).forEach(context => { 45 | let options = proxyTable[context] 46 | if (typeof options === 'string') { 47 | options = { target: options } 48 | } 49 | app.use(proxyMiddleware(options.filter || context, options)) 50 | }) 51 | 52 | // handle fallback for HTML5 history API 53 | app.use(require('connect-history-api-fallback')()) 54 | 55 | // serve webpack bundle output 56 | app.use(devMiddleware) 57 | 58 | // enable hot-reload and state-preserving 59 | // compilation error display 60 | app.use(hotMiddleware) 61 | 62 | // serve pure static assets 63 | const staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 64 | app.use(staticPath, express.static('./assets')) 65 | 66 | const uri = 'http://localhost:' + port 67 | 68 | devMiddleware.waitUntilValid(() => { 69 | console.log('> Listening at ' + uri + '\n') 70 | }) 71 | 72 | module.exports = app.listen(port, err => { 73 | if (err) { 74 | console.log(err) 75 | return 76 | } 77 | 78 | // when env is testing, don't need open it 79 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 80 | opn(uri) 81 | } 82 | }) 83 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | const config = require('../config') 5 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 6 | 7 | exports.assetsPath = _path => { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | return path.posix.join(assetsSubDirectory, _path) 12 | } 13 | 14 | exports.cssLoaders = options => { 15 | options = options || {} 16 | // generate loader string to be used with extract text plugin 17 | const generateLoaders = loaders => { 18 | const sourceLoader = loaders.map(loader => { 19 | let extraParamChar 20 | if (/\?/.test(loader)) { 21 | loader = loader.replace(/\?/, '-loader?') 22 | extraParamChar = '&' 23 | } else { 24 | loader = loader + '-loader' 25 | extraParamChar = '?' 26 | } 27 | return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '') 28 | }).join('!') 29 | 30 | // Extract CSS when that option is specified 31 | // (which is the case during production build) 32 | if (options.extract) { 33 | return ExtractTextPlugin.extract({ 34 | use: sourceLoader, 35 | fallback: 'vue-style-loader' 36 | }) 37 | } else { 38 | return ['vue-style-loader', sourceLoader].join('!') 39 | } 40 | } 41 | 42 | // http://vuejs.github.io/vue-loader/configurations/extract-css.html 43 | return { 44 | css: generateLoaders(['css']), 45 | postcss: generateLoaders(['css']), 46 | less: generateLoaders(['css', 'less']), 47 | sass: generateLoaders(['css', 'sass?indentedSyntax']), 48 | scss: generateLoaders(['css', 'sass']), 49 | stylus: generateLoaders(['css', 'stylus']), 50 | styl: generateLoaders(['css', 'stylus']) 51 | } 52 | } 53 | 54 | // Generate loaders for standalone style files (outside of .vue) 55 | exports.styleLoaders = options => { 56 | const output = [] 57 | const loaders = exports.cssLoaders(options) 58 | for (const extension of Object.keys(loaders)) { 59 | const loader = loaders[extension] 60 | output.push({ 61 | test: new RegExp('\\.' + extension + '$'), 62 | loader: loader 63 | }) 64 | } 65 | return output 66 | } 67 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | 6 | const isProduction = process.env.NODE_ENV === 'production' 7 | 8 | module.exports = { 9 | loaders: utils.cssLoaders({ 10 | sourceMap: isProduction ? config.build.productionSourceMap : config.dev.cssSourceMap, 11 | extract: isProduction 12 | }), 13 | postcss: [ 14 | require('autoprefixer')({ 15 | browsers: ['last 3 versions'] 16 | }) 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/watch.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | require('./check-versions')() 4 | 5 | const WriteFilePlugin = require("write-file-webpack-plugin"); 6 | const path = require('path') 7 | const express = require('express') 8 | const webpack = require('webpack') 9 | const merge = require('webpack-merge') 10 | const opn = require('opn') 11 | const config = require('../config') 12 | const proxyMiddleware = require('http-proxy-middleware') 13 | const webpackConfig = process.env.NODE_ENV === 'testing' 14 | ? require('./webpack.prod.conf') 15 | : require('./webpack.dev.conf') 16 | const utils = require('./utils') 17 | 18 | // default port where dev server listens for incoming traffic 19 | const port = process.env.PORT || config.dev.port 20 | // automatically open browser, if not set will be false 21 | const autoOpenBrowser = Boolean(config.dev.autoOpenBrowser) 22 | // Define HTTP proxies to your custom API backend 23 | // https://github.com/chimurai/http-proxy-middleware 24 | const proxyTable = config.dev.proxyTable 25 | 26 | const app = express() 27 | const compiler = webpack( merge(webpackConfig, { 28 | devServer: { 29 | outputPath: path.join(__dirname, '../dist') 30 | }, 31 | output: { 32 | path: config.build.assetsRoot, 33 | filename: utils.assetsPath('js/[name].js'), 34 | chunkFilename: utils.assetsPath('js/[id].js') 35 | }, 36 | plugins: [ 37 | new WriteFilePlugin() 38 | ], 39 | })) 40 | 41 | const devMiddleware = require('webpack-dev-middleware')(compiler, { 42 | publicPath: webpackConfig.output.publicPath, 43 | stats: { 44 | colors: true, 45 | chunks: false 46 | } 47 | }) 48 | 49 | // proxy api requests 50 | Object.keys(proxyTable).forEach(context => { 51 | let options = proxyTable[context] 52 | if (typeof options === 'string') { 53 | options = { target: options } 54 | } 55 | app.use(proxyMiddleware(options.filter || context, options)) 56 | }) 57 | 58 | // handle fallback for HTML5 history API 59 | app.use(require('connect-history-api-fallback')()) 60 | 61 | // serve webpack bundle output 62 | app.use(devMiddleware) 63 | 64 | // serve pure static assets 65 | const staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 66 | app.use(staticPath, express.static('./assets')) 67 | 68 | devMiddleware.waitUntilValid(() => { 69 | }) -------------------------------------------------------------------------------- /resources/assets/frontend/build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | const config = require('../config') 5 | const utils = require('./utils') 6 | const projectRoot = path.resolve(__dirname, '../') 7 | 8 | module.exports = { 9 | entry: { 10 | app: ['./client/index.js'], 11 | // If you want to support IE < 11, should add `babel-polyfill` to vendor. 12 | // e.g. ['babel-polyfill', 'vue', 'vue-router', 'vuex'] 13 | vendor: [ 14 | 'vue', 15 | 'vue-router', 16 | 'vuex', 17 | 'vuex-router-sync' 18 | ] 19 | }, 20 | output: { 21 | path: config.build.assetsRoot, 22 | publicPath: process.env.NODE_ENV === 'production' 23 | ? config.build.assetsPublicPath 24 | : config.dev.assetsPublicPath, 25 | filename: '[name].js' 26 | }, 27 | resolve: { 28 | extensions: ['.js', '.vue', '.css', '.json'], 29 | alias: { 30 | // https://github.com/vuejs/vue/wiki/Vue-2.0-RC-Starter-Resources 31 | // vue: 'vue/dist/vue', 32 | package: path.resolve(__dirname, '../package.json'), 33 | src: path.resolve(__dirname, '../client'), 34 | assets: path.resolve(__dirname, '../client/assets'), 35 | components: path.resolve(__dirname, '../client/components'), 36 | views: path.resolve(__dirname, '../client/views'), 37 | // third-party 38 | 'plotly.js': 'plotly.js/dist/plotly', 39 | // vue-addon 40 | 'vuex-store': path.resolve(__dirname, '../client/store') 41 | } 42 | }, 43 | module: { 44 | loaders: [ 45 | { 46 | test: /\.(js|vue)$/, 47 | loader: 'eslint-loader', 48 | include: projectRoot, 49 | exclude: /node_modules/, 50 | enforce: 'pre', 51 | options: { 52 | formatter: require('eslint-friendly-formatter') 53 | } 54 | }, 55 | { 56 | test: /\.vue$/, 57 | loader: 'vue-loader', 58 | options: require('./vue-loader.conf') 59 | }, 60 | { 61 | test: /\.js$/, 62 | loader: 'babel-loader', 63 | include: projectRoot, 64 | // /node_modules\/(?!vue-bulma-.*)/ 65 | exclude: [new RegExp(`node_modules\\${path.sep}(?!vue-bulma-.*)`)] 66 | }, 67 | { 68 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 69 | loader: 'url-loader', 70 | query: { 71 | limit: 10000, 72 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 73 | } 74 | }, 75 | { 76 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 77 | loader: 'url-loader', 78 | query: { 79 | limit: 10000, 80 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 81 | } 82 | } 83 | ] 84 | }, 85 | // See https://github.com/webpack/webpack/issues/3486 86 | performance: { 87 | hints: false 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const webpack = require('webpack') 4 | const merge = require('webpack-merge') 5 | const HtmlWebpackPlugin = require('html-webpack-plugin') 6 | const baseWebpackConfig = require('./webpack.base.conf') 7 | const config = require('../config') 8 | const utils = require('./utils') 9 | 10 | // add hot-reload related code to entry chunks 11 | Object.keys(baseWebpackConfig.entry).forEach(name => { 12 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 13 | }) 14 | 15 | module.exports = merge(baseWebpackConfig, { 16 | module: { 17 | loaders: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 18 | }, 19 | // eval-source-map is faster for development 20 | devtool: '#eval-source-map', 21 | plugins: [ 22 | new webpack.DefinePlugin({ 23 | 'process.env': config.dev.env 24 | }), 25 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 26 | new webpack.HotModuleReplacementPlugin(), 27 | new webpack.NoEmitOnErrorsPlugin(), 28 | // extract vendor chunks for better caching 29 | new webpack.optimize.CommonsChunkPlugin({ 30 | name: 'vendor', 31 | filename: 'vendor.js' 32 | }), 33 | // https://github.com/ampedandwired/html-webpack-plugin 34 | new HtmlWebpackPlugin({ 35 | title: 'Vue Admin', 36 | filename: 'index.html', 37 | template: 'index.html', 38 | inject: true, 39 | favicon: 'client/assets/logo.png' 40 | }) 41 | ] 42 | }) 43 | -------------------------------------------------------------------------------- /resources/assets/frontend/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | const webpack = require('webpack') 5 | const merge = require('webpack-merge') 6 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 7 | const HtmlWebpackPlugin = require('html-webpack-plugin') 8 | const baseWebpackConfig = require('./webpack.base.conf') 9 | const config = require('../config') 10 | const utils = require('./utils') 11 | const env = process.env.NODE_ENV === 'testing' 12 | ? require('../config/test.env') 13 | : config.build.env 14 | const isELECTRON = process.env.NODE_ELECTRON === 'true' 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | loaders: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true 21 | }) 22 | }, 23 | devtool: config.build.productionSourceMap ? '#source-map' : false, 24 | output: { 25 | path: config.build.assetsRoot, 26 | publicPath: isELECTRON ? path.join(__dirname, '../dist/') : '/', 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new webpack.LoaderOptionsPlugin({ 36 | minimize: true 37 | }), 38 | new webpack.optimize.UglifyJsPlugin({ 39 | 'screw-ie8': true, 40 | sourceMap: true, 41 | compress: { 42 | warnings: false 43 | }, 44 | output: { 45 | comments: false 46 | } 47 | }), 48 | // extract css into its own file 49 | new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')), 50 | // generate dist index.html with correct asset hash for caching. 51 | // you can customize output by editing /index.html 52 | // see https://github.com/ampedandwired/html-webpack-plugin 53 | new HtmlWebpackPlugin({ 54 | title: 'Vue Admin', 55 | filename: process.env.NODE_ENV === 'testing' 56 | ? 'index.html' 57 | : config.build.index, 58 | template: 'index.html', 59 | inject: true, 60 | favicon: 'client/assets/logo.png', 61 | minify: { 62 | removeComments: true, 63 | collapseWhitespace: true, 64 | removeAttributeQuotes: true 65 | // more options: 66 | // https://github.com/kangax/html-minifier#options-quick-reference 67 | }, 68 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 69 | chunksSortMode: 'dependency' 70 | }), 71 | // split vendor js into its own file 72 | new webpack.optimize.CommonsChunkPlugin({ 73 | name: 'vendor', 74 | minChunks (module, count) { 75 | // any required modules inside node_modules are extracted to vendor 76 | return ( 77 | module.resource && 78 | /\.js$/.test(module.resource) && 79 | module.resource.indexOf( 80 | path.join(__dirname, '../node_modules') 81 | ) === 0 82 | ) 83 | } 84 | }), 85 | // extract webpack runtime and module manifest to its own file in order to 86 | // prevent vendor hash from being updated whenever app bundle is updated 87 | new webpack.optimize.CommonsChunkPlugin({ 88 | name: 'manifest', 89 | chunks: ['vendor'] 90 | }) 91 | ] 92 | }) 93 | 94 | if (config.build.productionGzip) { 95 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 96 | 97 | webpackConfig.plugins.push( 98 | new CompressionWebpackPlugin({ 99 | asset: '[path].gz[query]', 100 | algorithm: 'gzip', 101 | test: new RegExp( 102 | '\\.(' + 103 | config.build.productionGzipExtensions.join('|') + 104 | ')$' 105 | ), 106 | threshold: 10240, 107 | minRatio: 0.8 108 | }) 109 | ) 110 | } 111 | 112 | module.exports = webpackConfig 113 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 54 | 55 | 96 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/app.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import axios from 'axios' 3 | import NProgress from 'vue-nprogress' 4 | import { sync } from 'vuex-router-sync' 5 | import App from './App.vue' 6 | import router from './router' 7 | import store from './store' 8 | import * as filters from './filters' 9 | import { TOGGLE_SIDEBAR } from 'vuex-store/mutation-types' 10 | 11 | Vue.use(NProgress) 12 | 13 | Vue.prototype.$http = axios 14 | Vue.axios = axios 15 | // Enable devtools 16 | Vue.config.devtools = true 17 | 18 | sync(store, router) 19 | 20 | const nprogress = new NProgress({ parent: '.nprogress-container' }) 21 | 22 | const { state } = store 23 | 24 | router.beforeEach((route, redirect, next) => { 25 | if (state.app.device.isMobile && state.app.sidebar.opened) { 26 | store.commit(TOGGLE_SIDEBAR, false) 27 | } 28 | next() 29 | }) 30 | 31 | Object.keys(filters).forEach(key => { 32 | Vue.filter(key, filters[key]) 33 | }) 34 | 35 | window.axios = require('axios') 36 | window.axios.defaults.headers.common = { 37 | 'X-CSRF-TOKEN': window.Laravel.csrfToken, 38 | 'X-Requested-With': 'XMLHttpRequest' 39 | } 40 | 41 | const app = new Vue({ 42 | router, 43 | store, 44 | nprogress, 45 | ...App 46 | }) 47 | 48 | export { app, router, store } 49 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/resources/assets/frontend/client/assets/logo.png -------------------------------------------------------------------------------- /resources/assets/frontend/client/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | vue-admin 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/assets/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/resources/assets/frontend/client/assets/logo@2x.png -------------------------------------------------------------------------------- /resources/assets/frontend/client/components/layout/AppMain.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 25 | 26 | 45 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/components/layout/FooterBar.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 33 | 34 | 53 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/components/layout/Levelbar.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 77 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/components/layout/Navbar.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 50 | 51 | 85 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/components/layout/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 134 | 135 | 188 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/components/layout/index.js: -------------------------------------------------------------------------------- 1 | export Navbar from './Navbar' 2 | 3 | export Sidebar from './Sidebar' 4 | 5 | export AppMain from './AppMain' 6 | 7 | export FooterBar from './FooterBar' 8 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/filters/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/resources/assets/frontend/client/filters/index.js -------------------------------------------------------------------------------- /resources/assets/frontend/client/index.js: -------------------------------------------------------------------------------- 1 | import { app } from './app' 2 | 3 | app.$mount('#app') 4 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import menuModule from 'vuex-store/modules/menu' 4 | Vue.use(Router) 5 | 6 | export default new Router({ 7 | mode: 'hash', // Demo is living in GitHub.io, so required! 8 | linkActiveClass: 'is-active', 9 | scrollBehavior: () => ({ y: 0 }), 10 | routes: [ 11 | { 12 | name: 'Home', 13 | path: '/', 14 | component: require('../views/Home') 15 | }, 16 | ...generateRoutesFromMenu(menuModule.state.items), 17 | { 18 | path: '*', 19 | redirect: '/' 20 | } 21 | ] 22 | }) 23 | 24 | // Menu should have 2 levels. 25 | function generateRoutesFromMenu (menu = [], routes = []) { 26 | for (let i = 0, l = menu.length; i < l; i++) { 27 | let item = menu[i] 28 | if (item.path) { 29 | routes.push(item) 30 | } 31 | if (!item.component) { 32 | generateRoutesFromMenu(item.children, routes) 33 | } 34 | } 35 | return routes 36 | } 37 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/actions.js: -------------------------------------------------------------------------------- 1 | import * as types from './mutation-types' 2 | 3 | export const toggleSidebar = ({ commit }, opened) => commit(types.TOGGLE_SIDEBAR, opened) 4 | 5 | export const toggleDevice = ({ commit }, device) => commit(types.TOGGLE_DEVICE, device) 6 | 7 | export const expandMenu = ({ commit }, menuItem) => { 8 | if (menuItem) { 9 | menuItem.expanded = menuItem.expanded || false 10 | commit(types.EXPAND_MENU, menuItem) 11 | } 12 | } 13 | 14 | export const switchEffect = ({ commit }, effectItem) => { 15 | if (effectItem) { 16 | commit(types.SWITCH_EFFECT, effectItem) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/getters.js: -------------------------------------------------------------------------------- 1 | const pkg = state => state.pkg 2 | const app = state => state.app 3 | const device = state => state.app.device 4 | const sidebar = state => state.app.sidebar 5 | const effect = state => state.app.effect 6 | const menuitems = state => state.menu.items 7 | const componententry = state => { 8 | return state.menu.items.filter(c => c.meta && c.meta.label === 'Components')[0] 9 | } 10 | 11 | export { 12 | pkg, 13 | app, 14 | device, 15 | sidebar, 16 | effect, 17 | menuitems, 18 | componententry 19 | } 20 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import pkg from 'package' 4 | import * as actions from './actions' 5 | import * as getters from './getters' 6 | 7 | import app from './modules/app' 8 | import menu from './modules/menu' 9 | 10 | Vue.use(Vuex) 11 | 12 | const store = new Vuex.Store({ 13 | strict: true, // process.env.NODE_ENV !== 'production', 14 | actions, 15 | getters, 16 | modules: { 17 | app, 18 | menu 19 | }, 20 | state: { 21 | pkg 22 | }, 23 | mutations: { 24 | } 25 | }) 26 | 27 | export default store 28 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/modules/app.js: -------------------------------------------------------------------------------- 1 | import * as types from '../mutation-types' 2 | 3 | const state = { 4 | device: { 5 | isMobile: false, 6 | isTablet: false 7 | }, 8 | sidebar: { 9 | opened: false, 10 | hidden: false 11 | }, 12 | effect: { 13 | translate3d: true 14 | } 15 | } 16 | 17 | const mutations = { 18 | [types.TOGGLE_DEVICE] (state, device) { 19 | state.device.isMobile = device === 'mobile' 20 | state.device.isTablet = device === 'tablet' 21 | }, 22 | 23 | [types.TOGGLE_SIDEBAR] (state, opened) { 24 | if (state.device.isMobile) { 25 | state.sidebar.opened = opened 26 | } else { 27 | state.sidebar.opened = true 28 | } 29 | }, 30 | 31 | [types.SWITCH_EFFECT] (state, effectItem) { 32 | for (let name in effectItem) { 33 | state.effect[name] = effectItem[name] 34 | } 35 | } 36 | } 37 | 38 | export default { 39 | state, 40 | mutations 41 | } 42 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/modules/menu/charts.js: -------------------------------------------------------------------------------- 1 | import lazyLoading from './lazyLoading' 2 | 3 | export default { 4 | name: 'Charts', 5 | path: '/charts', 6 | meta: { 7 | icon: 'fa-bar-chart-o', 8 | expanded: false, 9 | link: 'charts/index.vue' 10 | }, 11 | component: lazyLoading('charts', true), 12 | 13 | children: [ 14 | { 15 | name: 'Chartist', 16 | path: 'chartist', 17 | component: lazyLoading('charts/Chartist'), 18 | meta: { 19 | link: 'charts/Chartist.vue' 20 | } 21 | }, 22 | { 23 | name: 'Chartjs', 24 | path: 'chartjs', 25 | component: lazyLoading('charts/Chartjs'), 26 | meta: { 27 | link: 'charts/Chartjs.vue' 28 | } 29 | }, 30 | { 31 | name: 'Peity', 32 | path: 'peity', 33 | component: lazyLoading('charts/Peity'), 34 | meta: { 35 | link: 'charts/Peity.vue' 36 | } 37 | }, 38 | { 39 | name: 'Plotly', 40 | path: 'plotly', 41 | component: lazyLoading('charts/Plotly'), 42 | meta: { 43 | link: 'charts/Plotly.vue' 44 | } 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/modules/menu/index.js: -------------------------------------------------------------------------------- 1 | import * as types from '../../mutation-types' 2 | import lazyLoading from './lazyLoading' 3 | import charts from './charts' 4 | import uifeatures from './uifeatures' 5 | import components from './components' 6 | import tables from './tables' 7 | 8 | // show: meta.label -> name 9 | // name: component name 10 | // meta.label: display label 11 | 12 | const state = { 13 | items: [ 14 | { 15 | name: 'Dashboard', 16 | path: '/dashboard', 17 | meta: { 18 | icon: 'fa-tachometer', 19 | link: 'dashboard/index.vue' 20 | }, 21 | component: lazyLoading('dashboard', true) 22 | }, 23 | { 24 | name: 'Axios', 25 | path: '/axiosDemo', 26 | meta: { 27 | icon: 'fa-rocket', 28 | link: 'axios/index.vue' 29 | }, 30 | component: lazyLoading('axios', true) 31 | }, 32 | charts, 33 | uifeatures, 34 | components, 35 | tables 36 | ] 37 | } 38 | 39 | const mutations = { 40 | [types.EXPAND_MENU] (state, menuItem) { 41 | if (menuItem.index > -1) { 42 | if (state.items[menuItem.index] && state.items[menuItem.index].meta) { 43 | state.items[menuItem.index].meta.expanded = menuItem.expanded 44 | } 45 | } else if (menuItem.item && 'expanded' in menuItem.item.meta) { 46 | menuItem.item.meta.expanded = menuItem.expanded 47 | } 48 | } 49 | } 50 | 51 | export default { 52 | state, 53 | mutations 54 | } 55 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/modules/menu/lazyLoading.js: -------------------------------------------------------------------------------- 1 | // lazy loading Components 2 | // https://github.com/vuejs/vue-router/blob/dev/examples/lazy-loading/app.js#L8 3 | export default (name, index = false) => () => import(`views/${name}${index ? '/index' : ''}.vue`) 4 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/modules/menu/tables.js: -------------------------------------------------------------------------------- 1 | import lazyLoading from './lazyLoading' 2 | 3 | export default { 4 | name: 'Tables', 5 | meta: { 6 | icon: 'fa-table', 7 | expanded: false 8 | }, 9 | 10 | children: [ 11 | { 12 | name: 'BasicTables', 13 | path: '/tables/basic', 14 | meta: { 15 | label: 'Basic Tables', 16 | link: 'tables/Basic.vue' 17 | }, 18 | component: lazyLoading('tables/Basic') 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/modules/menu/uifeatures.js: -------------------------------------------------------------------------------- 1 | import lazyLoading from './lazyLoading' 2 | 3 | export default { 4 | meta: { 5 | label: 'UI Features', 6 | icon: 'fa-laptop', 7 | expanded: false 8 | }, 9 | 10 | children: [ 11 | { 12 | name: 'Buttons', 13 | path: '/buttons', 14 | meta: { 15 | link: 'ui/Buttons.vue' 16 | }, 17 | component: lazyLoading('ui/Buttons') 18 | }, 19 | { 20 | name: 'Form', 21 | path: '/form', 22 | meta: { 23 | link: 'ui/Form.vue' 24 | }, 25 | component: lazyLoading('ui/Form') 26 | }, 27 | { 28 | name: 'Typography', 29 | path: '/typography', 30 | meta: { 31 | link: 'ui/Typography.vue' 32 | }, 33 | component: lazyLoading('ui/Typography') 34 | }, 35 | { 36 | name: 'Icons', 37 | path: '/icons', 38 | meta: { 39 | link: 'ui/Icons.vue' 40 | }, 41 | component: lazyLoading('ui/Icons') 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/store/mutation-types.js: -------------------------------------------------------------------------------- 1 | export const TOGGLE_DEVICE = 'TOGGLE_DEVICE' 2 | 3 | export const TOGGLE_SIDEBAR = 'TOGGLE_SIDEBAR' 4 | 5 | export const EXPAND_MENU = 'EXPAND_MENU' 6 | 7 | export const SWITCH_EFFECT = 'SWITCH_EFFECT' 8 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/Home.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/axios/index.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 153 | 154 | 156 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/charts/Chartjs.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 154 | 155 | 157 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/charts/Peity.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 99 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/charts/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/BackToTop.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 58 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Collapse.vue: -------------------------------------------------------------------------------- 1 | 75 | 76 | 86 | 87 | 92 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Default.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 70 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Emoji.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 62 | 63 | 80 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Message.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 88 | 89 | 98 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Modal.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 93 | 94 | 96 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Notification.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 87 | 88 | 97 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/ProgressBar.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 82 | 83 | 88 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/ProgressTracker.vue: -------------------------------------------------------------------------------- 1 | 74 | 75 | 108 | 109 | 114 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Quill.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Rating.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 92 | 93 | 101 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Slider.vue: -------------------------------------------------------------------------------- 1 | 69 | 70 | 100 | 101 | 112 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/Switch.vue: -------------------------------------------------------------------------------- 1 | 66 | 67 | 90 | 91 | 102 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/index.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/modals/CardModal.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 39 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/modals/ImageModal.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 27 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/components/modals/Modal.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 56 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/ui/Icons.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 64 | -------------------------------------------------------------------------------- /resources/assets/frontend/client/views/ui/Typography.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 53 | -------------------------------------------------------------------------------- /resources/assets/frontend/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const merge = require('webpack-merge') 4 | const prodEnv = require('./prod.env') 5 | 6 | module.exports = merge(prodEnv, { 7 | NODE_ENV: '"development"' 8 | }) 9 | -------------------------------------------------------------------------------- /resources/assets/frontend/config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | const path = require('path') 5 | 6 | module.exports = { 7 | build: { 8 | env: require('./prod.env'), 9 | index: path.resolve(__dirname, '../dist/index.html'), 10 | assetsRoot: path.resolve(__dirname, '../dist'), 11 | assetsSubDirectory: 'assets', 12 | assetsPublicPath: '/', 13 | productionSourceMap: true, 14 | // Gzip off by default as many popular static hosts such as 15 | // Surge or Netlify already gzip all static assets for you. 16 | // Before setting to `true`, make sure to: 17 | // npm install --save-dev compression-webpack-plugin 18 | productionGzip: false, 19 | productionGzipExtensions: ['js', 'css'] 20 | }, 21 | dev: { 22 | env: require('./dev.env'), 23 | port: process.env.DEV_PORT || 8080, 24 | autoOpenBrowser: true, 25 | assetsSubDirectory: 'assets', 26 | assetsPublicPath: '/', 27 | proxyTable: { 28 | '/MODApis': { 29 | target: 'http://dev.markitondemand.com', 30 | changeOrigin: true 31 | } 32 | }, 33 | // CSS Sourcemaps off by default because relative paths are "buggy" 34 | // with this option, according to the CSS-Loader README 35 | // (https://github.com/webpack/css-loader#sourcemaps) 36 | // In our experience, they generally work as expected, 37 | // just be aware of this issue when enabling this option. 38 | cssSourceMap: false 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /resources/assets/frontend/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | NODE_ENV: '"production"' 5 | } 6 | -------------------------------------------------------------------------------- /resources/assets/frontend/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const merge = require('webpack-merge') 4 | const devEnv = require('./dev.env') 5 | 6 | module.exports = merge(devEnv, { 7 | NODE_ENV: '"testing"' 8 | }) 9 | -------------------------------------------------------------------------------- /resources/assets/frontend/doc/charts.md: -------------------------------------------------------------------------------- 1 | # Charts 2 | 3 | * Chart 4 | 5 | * Chartist 6 | 7 | * Peity 8 | 9 | * Plotly 10 | 11 | * ... 12 | -------------------------------------------------------------------------------- /resources/assets/frontend/doc/components.md: -------------------------------------------------------------------------------- 1 | j Components 2 | 3 | [Vue Bulma UI Components](https://github.com/vue-bulma) 4 | 5 | | Component | Demo | Source | 6 | | --- | --- | --- | 7 | | BackToTop | http://admin.vuebulma.com/#!/components/backtotop | https://github.com/vue-bulma/jump | 8 | | Breadcrumb | http://admin.vuebulma.com/#!/components/breadcrumb | https://github.com/vue-bulma/breadcrumb | 9 | | Cleave | http://admin.vuebulma.com/#!/ui/form | https://github.com/vue-bulma/cleave | 10 | | Collapse | http://admin.vuebulma.com/#!/components/collapse | https://github.com/vue-bulma/collapse | 11 | | Datepicker | http://admin.vuebulma.com/#!/components/datepicker | https://github.com/vue-bulma/datepicker | 12 | | Message | http://admin.vuebulma.com/#!/components/message | https://github.com/vue-bulma/message | 13 | | Modal | http://admin.vuebulma.com/#!/components/modal | https://github.com/vue-bulma/modal | 14 | | Notification | http://admin.vuebulma.com/#!/components/notification | https://github.com/vue-bulma/notification | 15 | | ProgressBar | http://admin.vuebulma.com/#!/components/progress | https://github.com/vue-bulma/progress-bar | 16 | | ProgressTracker | http://admin.vuebulma.com/#!/components/progress | https://github.com/vue-bulma/progress-tracker | 17 | | Rating | http://admin.vuebulma.com/#!/components/rating | https://github.com/vue-bulma/rating | 18 | | Slider | http://admin.vuebulma.com/#!/components/slider | https://github.com/vue-bulma/slider | 19 | | Switch | http://admin.vuebulma.com/#!/components/switch | https://github.com/vue-bulma/switch | 20 | | Tabs | http://admin.vuebulma.com/#!/components/tabs | https://github.com/vue-bulma/tabs | 21 | | Tooltip | http://admin.vuebulma.com/#!/components/tooltip | https://github.com/vue-bulma/tooltip | 22 | | ... | ... | 23 | -------------------------------------------------------------------------------- /resources/assets/frontend/doc/dependencies.md: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | 3 | 4 | ## System Components 5 | 6 | * [vue-resource][] 7 | * [vue-router][] 8 | * [vuex][] 9 | 10 | 11 | ## UI Components 12 | 13 | | Component | Library | 14 | | --- | --- | --- | 15 | | Animations & Transitions | [animate.css][] & [animejs][] | 16 | | BackToTop | [jump.js][] | 17 | | Cleave | [cleave.js][] | 18 | | Charts | [chart.js][], [chartist.js][], [peity][], [plotly.js][] | 19 | | Datepicker | [flatpickr][] | 20 | | Fonts | [font-awesome][], [Material Design icons][] | 21 | | Progress | [progress-tracker][] | 22 | | Rating | [Starability.css][] | 23 | | Tooltip | [hint.css][] | 24 | | ... | ... | 25 | 26 | 27 | ## Development Tools 28 | 29 | * [ESLint][] 30 | * [Babel][] 31 | * [Webpack][] 32 | * [vue-devtools][] 33 | 34 | 35 | [animate.css]: http://daneden.github.io/animate.css/ 36 | [animejs]: http://anime-js.com/ 37 | 38 | [vue-resource]: https://github.com/vuejs/vue-resource 39 | [vue-router]: https://github.com/vuejs/vue-router 40 | [vuex]: https://github.com/vuejs/vuex 41 | 42 | [jump.js]: http://callmecavs.com/jump.js/ 43 | 44 | [progress-tracker]: http://nigelotoole.github.io/progress-tracker/ 45 | 46 | [Starability.css]: http://lunarlogic.github.io/starability/ 47 | 48 | [hint.css]: http://kushagragour.in/lab/hint/ 49 | 50 | [flatpickr]: https://chmln.github.io/flatpickr/ 51 | 52 | [cleave.js]: http://nosir.github.io/cleave.js 53 | 54 | [chart.js]: http://www.chartjs.org 55 | [chartist.js]: https://gionkunz.github.io/chartist-js/index.html 56 | [peity]: https://github.com/benpickles/peity 57 | [plotly.js]: https://github.com/plotly/plotly.js 58 | 59 | [font-awesome]: http://fontawesome.io 60 | [Material Design icons]: http://google.github.io/material-design-icons/ 61 | 62 | [Babel]: http://babeljs.io/ 63 | [ESLint]: http://eslint.org 64 | [Webpack]: https://webpack.github.io 65 | [vue-devtools]: https://github.com/vuejs/vue-devtools 66 | -------------------------------------------------------------------------------- /resources/assets/frontend/doc/development.md: -------------------------------------------------------------------------------- 1 | # Development 2 | 3 | ## Build Setup 4 | 5 | ``` bash 6 | # install dependencies 7 | npm install 8 | 9 | # serve with hot reload at localhost:8080 10 | npm run dev 11 | 12 | # build for production with minification 13 | npm run build 14 | 15 | # run unit tests 16 | npm run unit 17 | 18 | # run e2e tests 19 | npm run e2e 20 | 21 | # run all tests 22 | npm test 23 | ``` 24 | 25 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 26 | -------------------------------------------------------------------------------- /resources/assets/frontend/electronIndex.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { app, BrowserWindow } = require('electron') 4 | 5 | // Keep a global reference of the window object, if you don't, the window will 6 | // be closed automatically when the JavaScript object is garbage collected. 7 | let mainWindow 8 | 9 | const isDev = process.env.NODE_ENV === 'development' 10 | 11 | function createWindow () { 12 | // Create the browser window. 13 | mainWindow = new BrowserWindow({ 14 | width: 800, 15 | height: 600 16 | }) 17 | 18 | // and load the index.html of the app. 19 | mainWindow.loadURL(`file://${__dirname}/dist/index.html`) 20 | 21 | // Open the DevTools. 22 | if (isDev) { 23 | mainWindow.webContents.openDevTools() 24 | 25 | const installExtension = require('electron-devtools-installer') 26 | installExtension.default(installExtension.VUEJS_DEVTOOLS) 27 | .then(name => console.log(`Added Extension: ${name}`)) 28 | .catch(err => console.log('An error occurred: ', err)) 29 | } 30 | 31 | // Emitted when the window is closed. 32 | mainWindow.on('closed', () => { 33 | // Dereference the window object, usually you would store windows 34 | // in an array if your app supports multi windows, this is the time 35 | // when you should delete the corresponding element. 36 | mainWindow = null 37 | }) 38 | } 39 | 40 | // This method will be called when Electron has finished 41 | // initialization and is ready to create browser windows. 42 | // Some APIs can only be used after this event occurs. 43 | app.on('ready', createWindow) 44 | 45 | // Quit when all windows are closed. 46 | app.on('window-all-closed', () => { 47 | // On OS X it is common for applications and their menu bar 48 | // to stay active until the user quits explicitly with Cmd + Q 49 | if (process.platform !== 'darwin') { 50 | app.quit() 51 | } 52 | }) 53 | 54 | app.on('activate', () => { 55 | // On OS X it's common to re-create a window in the app when the 56 | // dock icon is clicked and there are no other windows open. 57 | if (mainWindow === null) { 58 | createWindow() 59 | } 60 | }) 61 | 62 | // In this file you can include the rest of your app's specific main process 63 | // code. You can also put them in separate files and require them here. 64 | -------------------------------------------------------------------------------- /resources/assets/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /resources/assets/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-admin", 3 | "version": "0.1.12", 4 | "description": "Vue Admin Panel Framework", 5 | "repository": "vue-bulma/vue-admin", 6 | "homepage": "https://admin.vuebulma.com", 7 | "license": "MIT", 8 | "author": { 9 | "name": "Fangdun Cai", 10 | "email": "cfddream@gmail.com", 11 | "url": "fundon.me" 12 | }, 13 | "keywords": [ 14 | "admin", 15 | "bulma", 16 | "dashboard", 17 | "data", 18 | "visualization", 19 | "vue" 20 | ], 21 | "engines": { 22 | "node": ">=4", 23 | "npm": ">=3" 24 | }, 25 | "scripts": { 26 | "build-dev": "cross-env NODE_ENV=development node build/build.dev.js", 27 | "build": "cross-env NODE_ENV=production node build/build.js", 28 | "clean": "rm -rf dist", 29 | "dev": "cross-env NODE_ENV=development node build/dev-server.js", 30 | "electron": "cross-env NODE_ELECTRON=true npm run build && electron electronIndex.js", 31 | "gh": "npm run build && gh-pages -d dist", 32 | "lint": "eslint --ext .js .vue client/*", 33 | "lint:fix": "eslint --fix --ext .js .vue electron.js client/* build/* config/*", 34 | "watch": "cross-env NODE_ENV=development node build/watch.js" 35 | }, 36 | "dependencies": { 37 | "animate.css": "3.5.2", 38 | "animejs": "^2.0.1", 39 | "axios": "^0.15.3", 40 | "bulma": "^0.3.2", 41 | "font-awesome": "4.7.0", 42 | "mdi": "^1.8.36", 43 | "plotly.js": "^1.24.0", 44 | "vue": "^2.2.1", 45 | "vue-bulma-brace": "^0.1.0", 46 | "vue-bulma-breadcrumb": "^1.0.1", 47 | "vue-bulma-card": "^1.0.2", 48 | "vue-bulma-chartist": "^1.1.0", 49 | "vue-bulma-chartjs": "^1.0.4", 50 | "vue-bulma-collapse": "1.0.3", 51 | "vue-bulma-datepicker": "^1.3.0", 52 | "vue-bulma-emoji": "^0.0.2", 53 | "vue-bulma-expanding": "^0.0.1", 54 | "vue-bulma-jump": "^0.0.2", 55 | "vue-bulma-message": "^1.1.1", 56 | "vue-bulma-modal": "1.0.1", 57 | "vue-bulma-notification": "^1.1.1", 58 | "vue-bulma-progress-bar": "^1.0.2", 59 | "vue-bulma-progress-tracker": "0.0.4", 60 | "vue-bulma-quill": "0.0.1", 61 | "vue-bulma-rating": "^1.0.1", 62 | "vue-bulma-slider": "^1.0.2", 63 | "vue-bulma-switch": "^1.0.4", 64 | "vue-bulma-tabs": "^1.1.2", 65 | "vue-bulma-tooltip": "^1.0.3", 66 | "vue-cleave": "1.1.1", 67 | "vue-lory": "0.0.4", 68 | "vue-nprogress": "0.1.5", 69 | "vue-peity": "0.5.0", 70 | "vue-router": "^2.3.0", 71 | "vuex": "^2.2.1", 72 | "vuex-router-sync": "^4.1.2", 73 | "wysiwyg.css": "0.0.2" 74 | }, 75 | "devDependencies": { 76 | "autoprefixer": "^6.7.6", 77 | "babel-core": "^6.21.0", 78 | "babel-eslint": "^7.1.1", 79 | "babel-loader": "^6.2.10", 80 | "babel-plugin-transform-export-extensions": "^6.8.0", 81 | "babel-preset-es2015": "^6.14.0", 82 | "babel-preset-stage-2": "^6.17.0", 83 | "connect-history-api-fallback": "^1.3.0", 84 | "cross-env": "^3.1.3", 85 | "css-loader": "^0.26.1", 86 | "electron-devtools-installer": "^2.0.1", 87 | "eslint": "^3.12.2", 88 | "eslint-config-standard": "^7.0.0", 89 | "eslint-friendly-formatter": "^2.0.7", 90 | "eslint-loader": "^1.6.1", 91 | "eslint-plugin-html": "^2.0.1", 92 | "eslint-plugin-promise": "^3.5.0", 93 | "eslint-plugin-standard": "^2.1.1", 94 | "eventsource-polyfill": "^0.9.6", 95 | "express": "^4.15.0", 96 | "extract-text-webpack-plugin": "^2.0.0-beta.4", 97 | "file-loader": "^0.10.1", 98 | "html-webpack-plugin": "^2.25.0", 99 | "http-proxy-middleware": "^0.17.4", 100 | "imports-loader": "^0.7.0", 101 | "node-sass": "^4.1.1", 102 | "opn": "^4.0.2", 103 | "ora": "^1.1.0", 104 | "postcss-loader": "^1.3.3", 105 | "progress-bar-webpack-plugin": "^1.9.1", 106 | "sass-loader": "^6.0.2", 107 | "serve-favicon": "^2.4.1", 108 | "style-loader": "^0.13.1", 109 | "stylus": "^0.54.5", 110 | "stylus-loader": "^2.4.0", 111 | "url-loader": "^0.5.7", 112 | "vue-html-loader": "^1.2.3", 113 | "vue-loader": "^11.1.4", 114 | "vue-template-compiler": "^2.2.1", 115 | "webpack": "^2.2.1", 116 | "webpack-dev-middleware": "^1.9.0", 117 | "webpack-hot-middleware": "^2.14.0", 118 | "webpack-merge": "^3.0.0", 119 | "write-file-webpack-plugin": "^3.4.2" 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /resources/assets/frontend/screenshots/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/resources/assets/frontend/screenshots/app.png -------------------------------------------------------------------------------- /resources/assets/frontend/screenshots/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gazben/laravel-vue-admin/a553ae06d31ee0b4fc4a2201ce95d2fb09d46488/resources/assets/frontend/screenshots/preview.jpg -------------------------------------------------------------------------------- /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 six 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/views/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') -------------------------------------------------------------------------------- /resources/views/layouts/app.example.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /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 | ['web']], function(){ 15 | Route::get('/', 'AdminController@index')->name('root'); 16 | }); 17 | -------------------------------------------------------------------------------- /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 | !.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('/'); 20 | 21 | $response->assertStatus(200); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 19 | } 20 | } 21 | --------------------------------------------------------------------------------