new dashboard and profile pages with new design

This commit is contained in:
Nabeel Shahzad
2017-08-02 13:13:08 -05:00
parent e4dc989ab2
commit e4e23dd8a6
20 changed files with 306 additions and 352 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Http\Controllers\Frontend;
use App\Models\User;
use App\Repositories\AirportRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Support\Facades\Auth;
class ProfileController extends AppBaseController
{
private $airportRepository;
public function __construct(AirportRepository $airportRepo)
{
$this->airportRepository = $airportRepo;
}
public function index()
{
$airports = $this->airportRepository->all();
return $this->view('profile.index', [
'user' => Auth::user(),
'airports' => $airports,
]);
}
public function show($id)
{
$user = User::where('id', $id)->first();
if (empty($user)) {
Flash::error('User not found!');
return redirect(route('frontend.dashboard.index'));
}
$airports = $this->airportRepository->all();
return $this->view('profile.index', [
'user' => $user,
'airports' => $airports,
]);
}
public function update()
{
}
}