Merge pull request #8 from Juhlinus/master
Made the single-purpose controllers into invokable controllers instead.
This commit is contained in:
commit
f8cebad9e0
3 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ use Inertia\Inertia;
|
||||||
|
|
||||||
class DashboardController extends Controller
|
class DashboardController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function __invoke()
|
||||||
{
|
{
|
||||||
return Inertia::render('Dashboard/Index');
|
return Inertia::render('Dashboard/Index');
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ use Inertia\Inertia;
|
||||||
|
|
||||||
class ReportsController extends Controller
|
class ReportsController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function __invoke()
|
||||||
{
|
{
|
||||||
return Inertia::render('Reports/Index');
|
return Inertia::render('Reports/Index');
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ Route::post('login')->name('login.attempt')->uses('Auth\LoginController@login');
|
||||||
Route::get('logout')->name('logout')->uses('Auth\LoginController@logout');
|
Route::get('logout')->name('logout')->uses('Auth\LoginController@logout');
|
||||||
|
|
||||||
// Dashboard
|
// Dashboard
|
||||||
Route::get('/')->name('dashboard')->uses('DashboardController@index')->middleware('auth');
|
Route::get('/')->name('dashboard')->uses('DashboardController')->middleware('auth');
|
||||||
|
|
||||||
// Accounts
|
// Accounts
|
||||||
Route::get('accounts')->name('accounts')->uses('AccountsController@index')->middleware('remember', 'auth');
|
Route::get('accounts')->name('accounts')->uses('AccountsController@index')->middleware('remember', 'auth');
|
||||||
|
@ -56,7 +56,7 @@ Route::delete('contacts/{contact}')->name('contacts.destroy')->uses('ContactsCon
|
||||||
Route::put('contacts/{contact}/restore')->name('contacts.restore')->uses('ContactsController@restore')->middleware('auth');
|
Route::put('contacts/{contact}/restore')->name('contacts.restore')->uses('ContactsController@restore')->middleware('auth');
|
||||||
|
|
||||||
// Reports
|
// Reports
|
||||||
Route::get('reports')->name('reports')->uses('ReportsController@index')->middleware('auth');
|
Route::get('reports')->name('reports')->uses('ReportsController')->middleware('auth');
|
||||||
|
|
||||||
// 500 error
|
// 500 error
|
||||||
Route::get('500', function () {
|
Route::get('500', function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue