Commit 9d375733 by Palti Sinaga

H-2

parents d0087465 a5f736df
...@@ -44,8 +44,30 @@ class Handler extends ExceptionHandler ...@@ -44,8 +44,30 @@ class Handler extends ExceptionHandler
*/ */
public function render($request, Exception $exception) public function render($request, Exception $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); return parent::render($request, $exception);
} }
}
/** /**
* Convert an authentication exception into an unauthenticated response. * Convert an authentication exception into an unauthenticated response.
......
...@@ -8,6 +8,7 @@ use App\RequestHomestay; ...@@ -8,6 +8,7 @@ use App\RequestHomestay;
use App\Room; use App\Room;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\User; use App\User;
use League\Flysystem\Exception;
use Validator; use Validator;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Foundation\Auth\RegistersUsers;
...@@ -41,12 +42,13 @@ class AdminController extends Controller ...@@ -41,12 +42,13 @@ class AdminController extends Controller
//Mengakses Daftar Owner //Mengakses Daftar Owner
public function listOwner(){ public function listOwner(){
$count = User::all()->where('role',"Owner")->count(); $count = User::all()->where('role',"Owner")->count();
$data = User::all()->where('role',"Owner"); $data = User::all()->where('role',"Owner");
//dd($data); //dd($data);
return view('adminlte::layouts.admin.listOwner')->with('data',$data)->with('count',$count); return view('adminlte::layouts.admin.listOwner')->with('data',$data)->with('count',$count);
} }
//Menambah owner //Menambah owner
......
...@@ -48,10 +48,10 @@ class CustomerController extends Controller ...@@ -48,10 +48,10 @@ class CustomerController extends Controller
//Pemberian/Pengiriman Feedback //Pemberian/Pengiriman Feedback
public function sendFeedback(Request $request, $id){ public function sendFeedback(Request $request, $id){
if(Auth::guest()){ /* if(Auth::guest()){
dd("maaf nggak bisa bang"); dd("maaf nggak bisa bang");
} }
*/
$dataPelanggan = DB::table('pelanggan') $dataPelanggan = DB::table('pelanggan')
->select('pelanggan.id') ->select('pelanggan.id')
->where('pelanggan.id_akun','=',Auth::user()->id) ->where('pelanggan.id_akun','=',Auth::user()->id)
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<input type="text" class="text wow agileits w3layouts " name="jumlah_hari" placeholder="Lama Menginap" style="background-color: white; color: black"> <input type="text" class="text wow agileits w3layouts " name="jumlah_hari" placeholder="Lama Menginap" style="background-color: white; color: black">
</div> </div>
<div class="col-md-2 col-sm-2 agileits w3layouts contact-grid contact-grid-2 "> <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>
<div class="book"> <div class="book">
<input type="submit" class="more_btn wow agileits w3layouts " value="Book Now"> <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