@auth @php if(isset( $account)){ // $restaurant = getRestaurantLocation( ( $account ?: '' ) ); $restaurant = getRestaurantLocationOnAccount( ( $account ?: '' ) ); if( $restaurant ) { $restaurant_id = $restaurant->restaurant_id; // $location_id = $restaurant->restaurant_id; $location_id = $restaurant->id; } else { header("Location: https://api.eaterli.com/not-found", true, 302); exit(); } } $restaurant_id=isset( $restaurant_id )? $restaurant_id:''; $location_id=isset( $location_id )? $location_id:''; @endphp {{--@hasrole('Admin') @php $restaurant_id = auth()->user()->getRestaurantData()->id; $location_id = auth()->user()->getRestaurantPrimaryLocation()->id; @endphp @endhasrole--}} {{--@hasanyrole('BranchOwner|BranchManager|BranchStaffMember') @php $location = auth()->user()->getLocationUserData(); $location_id = $location->id; $restaurant_id = $location->restaurant_id; @endphp @endhasanyrole --}} @else @php $restaurant = getRestaurantLocation( ( $account ?: '' ) ); $restaurant = getRestaurantLocationOnAccount( ( $account ?: '' ) ); if( $restaurant ) { $restaurant_id = $restaurant->restaurant_id; // $location_id = $restaurant->restaurant_id; $location_id = $restaurant->id; } else { header("Location: https://api.eaterli.com/not-found", true, 302); exit(); } $restaurant_id=isset( $restaurant_id )? $restaurant_id:''; $location_id=isset( $location_id )? $location_id:''; @endphp @endauth @php $rest_logo = $data?->theme_settings?->logo ?? ""; @endphp @include('layouts.include.react-app-script')