view restaurant

This commit is contained in:
sayliraut
2024-05-29 23:05:31 +05:30
parent 5b78d9a175
commit dc703c5dcc
4 changed files with 103 additions and 1 deletions

View File

@@ -142,4 +142,23 @@ class ManageRestrauntController extends Controller
}
}
public function viewRestaurant(Request $request, $id)
{
try {
$restaurantItem = ManageRestaurant::where('id', $id)->first();
$restaurantItem['image'] = ListingImageUrl('restaurant_images', $restaurantItem['image']);
$operating_hours = OperatingHour::where('manage_restaurant_xid', $id)->get()->keyBy('day_of_week');
return view('admin.pages.manage_restaurants.view_restaurant', compact('restaurantItem','operating_hours'));
} catch (Exception $e) {
Log::error("view Voucher Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -90,7 +90,7 @@
</button>
<ul>
<li>
<a href="">
<a href={{ route('manage_view_restaurant', $restaurants->id) }}">
<img src="{{ asset('public/assets/img/view.svg') }}" />
<span>View</span>
</a>

View File

@@ -0,0 +1,81 @@
@extends('Admin.layouts.master')
@section('content')
@php
$currentPage = 'restraunt';
@endphp
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4 left">
<a class="d-flex align-items-center justify-content-center pl-2"
href="{{ route('manage.restaurants')}}">
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
<h6 class="card-title p-0">View Details</h6>
</a>
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn p-0">
<div class="view-details">
<div class="simple-tab">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel"
aria-labelledby="home-tab" tabindex="0">
<div class="row">
<div class="col-md-6 mb-10 tabs23">
<table>
<tr class="title">
<td>Restaurant Name :</td>
<td>Restaurant ID :</td>
<td>Image :</td>
</tr>
<tr class="w-100">
<td>{{$restaurantItem->name}}</td>
<td>{{$restaurantItem->restaurant_id}}</td>
{{-- <td height="10px" width="10px"><img src="{{$restaurantItem->image}}"></td> --}}
</tr>
</table>
</div>
<div class="col-md-6 mb-10">
<table>
<tr class="title">
<td>Description :</td>
<td>Status :</td>
<td>Address :</td>
</tr>
<tr class="w-100">
<td>{!! $restaurantItem->description !!}</td>
<td>{{$restaurantItem->is_active == 1 ? 'Active':'Expired'}}</td>
<td >{{$restaurantItem->address}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
@endsection

View File

@@ -137,6 +137,8 @@ Route::get('/manage_restaurant_add', [ManageRestrauntController::class, 'add'])-
Route::post('/store_restaurant', [ManageRestrauntController::class, 'store_restaurant']);
Route::get('/edit_restaurant/{id}', [ManageRestrauntController::class, 'edit_restaurant'])->name('edit_restaurant');
Route::post('/update_restaurant', [ManageRestrauntController::class, 'update'])->name('update_restaurant');
Route::get('/manage_view_restaurant/{id}', [ManageRestrauntController::class, 'viewRestaurant'])->name('manage_view_restaurant');
});