* #355 Calculate distance button in add/edit Flight page * Styling * Move add/edit flight logic out of controller and into service layer * Styling * Formatting * Run styleci against modules dir * Styleci config * Style fixes in /modules
This commit is contained in:
@@ -7,7 +7,6 @@ use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Class AdminController
|
||||
* @package Modules\Sample\Http\Controllers\Admin
|
||||
*/
|
||||
class AdminController extends Controller
|
||||
{
|
||||
|
||||
@@ -7,13 +7,14 @@ use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Class SampleController
|
||||
* @package Modules\Sample\Http\Controllers\Api
|
||||
*/
|
||||
class SampleController extends Controller
|
||||
{
|
||||
/**
|
||||
* Just send out a message
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function index(Request $request)
|
||||
@@ -23,6 +24,7 @@ class SampleController extends Controller
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function hello(Request $request)
|
||||
@@ -33,5 +35,4 @@ class SampleController extends Controller
|
||||
'name' => Auth::user()->name,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Class SampleController
|
||||
* @package Modules\Sample\Http\Controllers
|
||||
*/
|
||||
class SampleController extends Controller
|
||||
{
|
||||
@@ -29,7 +28,8 @@ class SampleController extends Controller
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* @param Request $request
|
||||
*
|
||||
* @param Request $request
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
# This is the admin path. Comment this out if you don't have
|
||||
# an admin panel component.
|
||||
// This is the admin path. Comment this out if you don't have
|
||||
// an admin panel component.
|
||||
Route::group([], function () {
|
||||
Route::get('/', 'AdminController@index');
|
||||
Route::get('/create', 'AdminController@create');
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
/**
|
||||
* This is publicly accessible
|
||||
*/
|
||||
Route::group(['middleware' => []], function() {
|
||||
Route::group(['middleware' => []], function () {
|
||||
Route::get('/', 'SampleController@index');
|
||||
});
|
||||
|
||||
/**
|
||||
/*
|
||||
* This is required to have a valid API key
|
||||
*/
|
||||
Route::group(['middleware' => [
|
||||
'api.auth'
|
||||
]], function() {
|
||||
'api.auth',
|
||||
]], function () {
|
||||
Route::get('/hello', 'SampleController@hello');
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
Route::group(['middleware' => [
|
||||
'role:user' # leave blank to make this public
|
||||
]], function() {
|
||||
# all your routes are prefixed with the above prefix
|
||||
# e.g. yoursite.com/sample
|
||||
'role:user', // leave blank to make this public
|
||||
]], function () {
|
||||
// all your routes are prefixed with the above prefix
|
||||
// e.g. yoursite.com/sample
|
||||
Route::get('/', 'SampleController@index');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user