Cleanup Controller inheritance

This commit is contained in:
Nabeel Shahzad
2018-01-11 21:35:03 -06:00
parent 174e3d1461
commit fe4f39a5dc
14 changed files with 27 additions and 46 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Controllers\Frontend;
use Illuminate\Database\QueryException;
use App\Http\Controllers\Controller;
use App\Models\User;
class HomeController extends Controller
{
/**
* Show the application dashboard.
*/
public function index()
{
try {
$users = User::orderBy('created_at', 'desc')->take(4)->get();
} catch (QueryException $e) {
return view('system/errors/not_installed');
}
return $this->view('home', [
'users' => $users,
]);
}
}