Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Last active July 19, 2019 03:08
Show Gist options
  • Select an option

  • Save nobodyplace/2c3c0e2deb1d7ea1b1cd58c407f2bf74 to your computer and use it in GitHub Desktop.

Select an option

Save nobodyplace/2c3c0e2deb1d7ea1b1cd58c407f2bf74 to your computer and use it in GitHub Desktop.
<?php
//APP_ENVで分岐
Route::group([
'domain' => 'fuga.hoge.'.((env('APP_ENV') == 'production') ? 'com' : 'app')
], function() {
Route::get('/', function () { return view('hoge/index'); });
Route::resource('/app', 'AppController')->except([
'index', 'create', 'edit'
]);
Route::get('/data/{any}', function ($any=null) { //vue-routerでルーティングする
return view('hoge/data');
})->where('any', '.*');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment