Skip to content

Commit

Permalink
integrate vue
Browse files Browse the repository at this point in the history
  • Loading branch information
jalatech committed Mar 6, 2019
1 parent ef49e56 commit 4f99949
Show file tree
Hide file tree
Showing 44 changed files with 169,324 additions and 96 deletions.
31 changes: 31 additions & 0 deletions app/Http/Controllers/IndexController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

/**
* IndexController
*/
class IndexController extends Controller
{
/**
* Instantiate a new controller instance.
*
* @return void
*/
public function __construct()
{
//$this->middleware('auth');
}

/**
* Invoke single action controller.
*
* @return \Illuminate\Http\Response
*/
public function __invoke($path = null)
{
return response()->view('index');
}
}
2 changes: 2 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
\Barryvdh\Cors\HandleCors::class,
];

/**
Expand All @@ -35,6 +36,7 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
],

'api' => [
Expand Down
7 changes: 6 additions & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;

class AuthServiceProvider extends ServiceProvider
{
Expand All @@ -27,6 +28,10 @@ public function boot()
{
$this->registerPolicies();

//
Passport::routes();

Passport::tokensExpireIn(now()->addDays(15));

Passport::refreshTokensExpireIn(now()->addDays(30));
}
}
5 changes: 5 additions & 0 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,10 @@ protected function mapApiRoutes()
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));

Route::domain('api.'.config('app.domain'))
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"require": {
"php": "^7.1.3",
"atnic/laravel-generator": "^0.9.5",
"barryvdh/laravel-cors": "^0.11.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0"
Expand Down
116 changes: 115 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
|
*/

'domain' => env('APP_DOMAIN', 'localhost'),

'url' => env('APP_URL', 'http://localhost'),

'asset_url' => env('ASSET_URL', null),
Expand Down
23 changes: 23 additions & 0 deletions config/cors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Laravel CORS
|--------------------------------------------------------------------------
|
| allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
| to accept any value.
|
*/

'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedOriginsPatterns' => [],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 0,

];
22 changes: 21 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,36 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-plugin-eslint": "^3.3.0",
"@vue/cli-plugin-pwa": "^3.3.0",
"@vue/cli-service": "^3.3.0",
"axios": "^0.18",
"babel-eslint": "^10.0.1",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"jquery": "^3.2",
"js-cookie": "^2.2.0",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"moment": "^2.24.0",
"popper.js": "^1.12",
"register-service-worker": "^1.6.2",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17"
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue": "^2.5.17",
"vue-axios": "^2.1.4",
"vue-cli-plugin-vuetify": "^0.4.6",
"vue-router": "^3.0.2",
"vue-template-compiler": "^2.6.8",
"vuetify": "^1.5.5",
"vuetify-loader": "^1.0.5",
"vuex": "^3.1.0",
"webpack-cli": "^3.2.3"
}
}
10,664 changes: 10,659 additions & 5 deletions public/css/app.css

Large diffs are not rendered by default.

51,144 changes: 51,143 additions & 1 deletion public/js/app.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4f99949

Please sign in to comment.