Commit 9d375733 by Palti Sinaga

H-2

parents d0087465 a5f736df
......@@ -44,7 +44,29 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
if($this->isHttpException($exception))
{
switch ($exception->getStatusCode())
{
// not found
case 404:
return redirect()->guest('home');
break;
// internal error
case '500':
return redirect()->guest('home');
break;
default:
return $this->renderHttpException($exception);
break;
}
}
else
{
return parent::render($request, $exception);
}
}
/**
......
......@@ -8,6 +8,7 @@ use App\RequestHomestay;
use App\Room;
use Illuminate\Http\Request;
use App\User;
use League\Flysystem\Exception;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
......@@ -41,12 +42,13 @@ class AdminController extends Controller
//Mengakses Daftar Owner
public function listOwner(){
$count = User::all()->where('role',"Owner")->count();
$data = User::all()->where('role',"Owner");
//dd($data);
//dd($data);
return view('adminlte::layouts.admin.listOwner')->with('data',$data)->with('count',$count);
}
//Menambah owner
......
......@@ -48,10 +48,10 @@ class CustomerController extends Controller
//Pemberian/Pengiriman Feedback
public function sendFeedback(Request $request, $id){
if(Auth::guest()){
/* if(Auth::guest()){
dd("maaf nggak bisa bang");
}
*/
$dataPelanggan = DB::table('pelanggan')
->select('pelanggan.id')
->where('pelanggan.id_akun','=',Auth::user()->id)
......
......@@ -45,7 +45,7 @@
<input type="text" class="text wow agileits w3layouts " name="jumlah_hari" placeholder="Lama Menginap" style="background-color: white; color: black">
</div>
<div class="col-md-2 col-sm-2 agileits w3layouts contact-grid contact-grid-2 ">
<input type="text" class="text wow agileits w3layouts " name="jumlah_kamar" placeholder="Jumlah Kamar" style="background-color: white; color: black">
<input type="number" min="0" class="text wow agileits w3layouts " name="jumlah_kamar" placeholder="Jumlah Kamar" style="background-color: white; color: black">
</div>
<div class="book">
<input type="submit" class="more_btn wow agileits w3layouts " value="Book Now">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment