@php $url = ''; $MyNavBar = \Menu::make('MenuList', function ($menu) use($url){ $menu->add(''.__('messages.main').'', ['class' => 'category-main']); $menu->add(''.__('messages.dashboard').''.__('messages.dashboard').'', ['route' => 'home']) ->prepend('') ->link->attr(['class' => '']); $menu->add(__('messages.sidebar_form_title',['form' => trans('messages.service')]), ['class' => 'category-main']) ->data('permission', ['category list','subcategory list','service list']); $menu->add(''.trans('messages.category').''.__('messages.category').'', ['class' => '']) ->prepend(' ') ->nickname('category') ->data('permission', 'category list') ->link->attr(["class" => ""]) ->href('#category'); $menu->category->add(''.trans('messages.list_form_title',['form' => trans('messages.category')]).'', ['class' => 'sidebar-layout' ,'route' => 'category.index']) ->prepend('') ->data('permission', 'category list') ->link->attr(['class' => '']); $menu->category->add(''.trans('messages.add_form_title',['form' => trans('messages.category')]).'', ['class' => 'sidebar-layout' ,'route' => 'category.create']) ->data('permission', 'category add') ->prepend('') ->link->attr(['class' => '']); $menu->add(''.trans('messages.subcategory').''.__('messages.subcategory').'', ['class' => '']) ->prepend('') ->nickname('subcategory') ->data('permission', 'subcategory list') ->link->attr(["class" => ""]) ->href('#subcategory'); $menu->subcategory->add(''.trans('messages.list_form_title',['form' => trans('messages.subcategory')]).'', ['class' => 'sidebar-layout' ,'route' => 'subcategory.index']) ->prepend('') ->data('permission', 'subcategory list') ->link->attr(['class' => '']); $menu->subcategory->add(''.trans('messages.add_form_title',['form' => trans('messages.subcategory')]).'', ['class' => 'sidebar-layout' ,'route' => 'subcategory.create']) ->data('permission', 'subcategory add') ->prepend('') ->link->attr(['class' => '']); $menu->add(''.trans('messages.service').''.__('messages.service').'', ['class' => '']) ->prepend('') ->nickname('services') ->data('permission', 'service list') ->link->attr(["class" => ""]) ->href('#services'); $menu->services->add(''.trans('messages.list_form_title',['form' => trans('messages.service')]).'', ['class' => 'sidebar-layout' ,'route' => 'service.index']) ->prepend('') ->data('permission', 'service list') ->link->attr(['class' => '']); $menu->services->add(''.trans('messages.add_form_title',['form' => trans('messages.service')]).'', ['class' => 'sidebar-layout' ,'route' => 'service.create']) ->data('permission', 'service add') ->prepend('') ->link->attr(['class' => '']); $menu->services->add(''.trans('user service list',['form' => trans('messages.service')]).'', ['class' => 'sidebar-layout' ,'route' => 'service.user-service-list']) ->prepend('') ->data('permission', 'user service list') ->link->attr(['class' => '']); $menu->add(''.trans('messages.service_package').''.__('messages.service_package').'', ['class' => '']) ->prepend('') ->nickname('package') ->data('role', ['admin','provider','demo_admin']) ->link->attr(["class" => ""]) ->href('#package'); $menu->package->add(''.trans('messages.list_form_title',['form' => trans('messages.service_package')]).'', ['class' => 'sidebar-layout' ,'route' => 'servicepackage.index']) ->prepend('') ->data('role', ['admin','provider','demo_admin']) ->link->attr(['class' => '']); $menu->package->add(''.trans('messages.add_form_title',['form' => trans('messages.service_package')]).'', ['class' => 'sidebar-layout' ,'route' => 'servicepackage.create']) ->data('role', ['admin','provider','demo_admin']) ->prepend('') ->link->attr(['class' => '']); $menu->add(__('messages.sidebar_form_title',['form' => trans('messages.booking')]), ['class' => 'category-main'])->data('permission', 'booking list'); $menu->add(''.__('messages.booking').''.__('messages.booking').'', ['route' => 'booking.index']) ->prepend('') ->nickname('booking') ->data('permission', 'booking list'); $menu->add(__('messages.sidebar_form_title',['form' => trans('messages.user')]), ['class' => 'category-main'])->data('permission', ['provider list','handyman list','user list']); $menu->add(''.__('messages.provider').''.__('messages.provider').'', ['class' => '']) ->prepend('') ->nickname('provider') ->data('permission', 'provider list') ->link->attr(["class" => ""]) ->href('#providers'); $menu->provider->add(''.__('messages.list_form_title',['form' => __('messages.provider')]).'', ['class' => 'sidebar-layout' ,'route' => 'provider.index']) ->data('permission', 'provider list') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.__('messages.pending_list_form_title',['form' => __('messages.provider')]).'', ['class' => 'sidebar-layout' ,'route' => ['provider.pending','pending']]) ->data('permission', 'pending provider') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.__('messages.list_form_title',['form' => __('messages.providerdocument')]).'', ['class' => 'sidebar-layout' ,'route' => 'providerdocument.index']) ->data('permission', 'providerdocument list') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.__('messages.list_form_title',['form' => __('messages.provider_payout')]).'', ['class' => 'sidebar-layout' ,'route' => 'providerpayout.index']) ->data('permission', 'payout list') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.__('messages.list_form_title',['form' => __('messages.providertype')]).'', ['class' => 'sidebar-layout' ,'route' => 'providertype.index']) ->data('permission', 'providertype list') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.__('messages.list_form_title',['form' => __('messages.provider_address')]).'', ['class' => 'sidebar-layout' ,'route' => 'provideraddress.index']) ->data('permission', 'provideraddress list') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.__('messages.list_form_title',['form' => __('messages.subscribe')]).'', ['class' => 'sidebar-layout' ,'route' => ['provider.pending','subscribe']]) ->data('role', 'admin') ->prepend('') ->link->attr(['class' => '']); $menu->provider->add(''.trans('messages.list_form_title',['form' => trans('messages.bank')]).'', ['class' => 'sidebar-layout' ,'route' => 'bank.index']) ->prepend('') ->data('permission', 'bank list') ->link->attr(['class' => '']); $menu->add(''.__('messages.handyman').''.__('messages.handyman').'', ['class' => '']) ->prepend('') ->nickname('handyman') ->data('permission', 'handyman list') ->link->attr(["class" => ""]) ->href('#handyman'); $menu->handyman->add(''.__('messages.list_form_title',['form' => __('messages.handyman')]).'', ['class' => 'sidebar-layout' ,'route' => 'handyman.index']) ->data('permission', 'handyman list') ->prepend('') ->link->attr(['class' => '']); $menu->handyman->add(''.__('messages.pending_list_form_title',['form' => __('messages.handyman')]).'', ['class' => 'sidebar-layout' ,'route' => ['handyman.pending','pending']]) ->data('permission', 'pending handyman') ->prepend('') ->link->attr(['class' => '']); $menu->handyman->add(''.__('messages.unassigned_list_form_title',['form' => __('messages.handyman')]).'', ['class' => 'sidebar-layout' ,'route' => ['handyman.pending','unassigned']]) ->data('permission', 'pending handyman') ->prepend('') ->link->attr(['class' => '']); $menu->handyman->add(''.__('messages.list_form_title',['form' => __('messages.handyman_earning')]).'', ['class' => 'sidebar-layout' ,'route' => 'handymanEarning']) ->data('role', 'provider') ->prepend('') ->link->attr(['class' => '']); $menu->handyman->add(''.__('messages.list_form_title',['form' => __('messages.handymantype')]).'', ['class' => 'sidebar-layout' ,'route' => 'handymantype.index']) ->data('permission', 'handymantype list') ->prepend('') ->link->attr(['class' => '']); $menu->handyman->add(''.__('messages.list_form_title',['form' => __('messages.handyman_payout')]).'', ['class' => 'sidebar-layout' ,'route' => 'handymanpayout.index']) ->data('permission', 'handymanpayout list') ->prepend('') ->link->attr(['class' => '']); $menu->add(''.__('messages.list_form_title',['form' => trans('messages.customer') ]).''.__('messages.customer').'', ['route' => 'user.index']) ->prepend('') ->nickname('user') ->data('permission', 'user list'); $menu->add(''.__('messages.list_form_title',['form' => trans('messages.all_user')]).''.__('messages.users').'', ['route' => ['user.all','all']]) ->prepend('') ->nickname('user') ->data('permission', 'user list'); $menu->add('Transactions', ['class' => 'category-main'])->data('permission', ['tax list','payment list','earning list']); $menu->add(''.__('messages.tax').''.__('messages.tax').'', ['route' => 'tax.index']) ->prepend('') ->nickname('tax') ->data('permission', 'tax list'); $menu->add(''.__('messages.payment').''.__('messages.payment').'', ['route' => 'payment.index']) ->prepend(' ') ->nickname('payment') ->data('permission', 'payment list'); $menu->add(''.__('messages.cash_payment').''.__('messages.cash_payment').'', ['route' => 'cash.list']) ->prepend(' ') ->nickname('cash_history') ->data('permission', 'payment list'); $menu->add(''.__('messages.earning').''.__('messages.earning').'', ['route' => 'earning']) ->prepend('') ->nickname('earning') ->data('permission', 'earning list'); $menu->add(''.__('messages.wallet').''.__('messages.wallet').'', ['route' => 'wallet.index']) ->prepend('') ->nickname('wallet') ->data('permission', 'wallet list'); $menu->add('Post Job', ['class' => 'category-main'])->data('permission', ['post job']); $menu->add(''.trans('messages.list_form_title',['form' => trans('messages.postjob')]).''.__('messages.post_job').'', ['route' => 'post-job-request.index']) ->prepend('') ->nickname('post_job') ->data('permission', 'post job'); $menu->add(__('messages.promotion'), ['class' => 'category-main'])->data('permission', 'coupon list'); $menu->add(''.__('messages.coupon').''.__('messages.coupon').'', ['class' => '']) ->prepend('') ->nickname('coupon') ->data('permission', 'coupon list') ->link->attr(["class" => ""]) ->href('#coupon'); $menu->coupon->add(''.__('messages.list_form_title',['form' => __('messages.coupon')]).'', ['class' => 'sidebar-layout' ,'route' => 'coupon.index']) ->data('permission', 'coupon list') ->prepend('') ->link->attr(['class' => '']); $menu->coupon->add(''.__('messages.add_form_title',['form' => __('messages.coupon')]).'', ['class' => 'sidebar-layout' ,'route' => 'coupon.create']) ->data('permission', 'coupon add') ->prepend('') ->link->attr(['class' => '']); $menu->add('Ratings', ['class' => 'category-main'])->data('permission', ['user rating list','handyman rating list']); $menu->add(''.trans('messages.list_form_title',['form' => trans('messages.user_ratings')]).''.__('messages.user_ratings').'', ['route' => 'booking-rating.index']) ->prepend('') ->nickname('user_ratings') ->data('permission', 'user rating list'); $menu->add(''.trans('messages.list_form_title',['form' => trans('messages.handyman_ratings')]).''.__('messages.handyman_ratings').'', ['route' => 'handyman-rating.index']) ->prepend('') ->nickname('handyman_ratings') ->data('permission', 'handyman rating list'); $menu->add(__('messages.sidebar_form_title',['form' => trans('messages.system')]), ['class' => 'category-main']) ->data('permission', ['terms condition','privacy policy','help support','refund cancellation policy','document list']); $menu->add(''.__('messages.plan').''.__('messages.plan').'', ['route' => 'plans.index']) ->prepend('') ->nickname('plan') ->data('permission', 'plan list'); $menu->add(''.__('messages.pages').''.__('messages.pages').'', ['class' => '']) ->prepend('') ->nickname('pages') ->data('permission', 'pages') ->link->attr(["class" => ""]) ->href('#pages'); $menu->pages->add(''.__('messages.terms_condition').'', ['class' => 'sidebar-layout' ,'route' => 'term-condition']) ->data('permission', 'terms condition') ->prepend('') ->link->attr(['class' => '']); $menu->pages->add(''.__('messages.privacy_policy').'', ['class' => 'sidebar-layout' ,'route' => 'privacy-policy']) ->data('permission', 'privacy policy') ->prepend('') ->link->attr(['class' => '']); $menu->pages->add(''.__('messages.help_support').'', ['class' => 'sidebar-layout' ,'route' => 'help-support']) ->data('permission', 'help support') ->prepend('') ->link->attr(['class' => '']); $menu->pages->add(''.__('messages.refund_cancellation_policy').'', ['class' => 'sidebar-layout' ,'route' => 'refund-cancellation-policy']) ->data('permission', 'refund cancellation policy') ->prepend('') ->link->attr(['class' => '']); $menu->pages->add(''.__('messages.blog').'', ['class' => 'sidebar-layout' ,'route' => 'blog.index']) ->data('role', ['admin','provider','demo_admin']) ->prepend('') ->link->attr(['class' => '']); $menu->add(''.__('messages.document').''.__('messages.document').'', ['class' => '']) ->prepend('') ->nickname('document') ->data('permission', 'document list') ->link->attr(["class" => ""]) ->href('#document'); $menu->document->add(''.__('messages.list_form_title',['form' => trans('messages.document') ]).'', [ 'class' => 'sidebar-layout' , 'route' => ['document.index']]) ->prepend('') ->data('permission', 'document list') ->link->attr(array('class' => '')); $menu->document->add(''.__('messages.add_form_title',['form' => trans('messages.document')]).'', array( 'class' => 'sidebar-layout', 'route' => 'document.create')) ->prepend('') ->data('permission', 'document add') ->link->attr(['class' => '']); $menu->add(''.__('messages.frontend_setting').'frontend setting', ['class' => '']) ->prepend('') ->nickname('frontend_setting') ->data('role', 'admin') ->link->attr(["class" => ""]) ->href('#frontend_setting'); $menu->frontend_setting->add(''.__('messages.list_setting_title',['form' => __('messages.app_download')]).'', ['class' => 'sidebar-layout' ,'route' => 'app-download']) ->data('role', 'admin') ->prepend('') ->link->attr(['class' => '']); $menu->add(''.__('messages.account_setting').''.__('messages.account_setting').'', ['class' => '']) ->prepend('') ->nickname('account_setting') ->data('permission', ['role list','permission list']) ->link->attr(["class" => ""]) ->href('#account_setting'); $menu->account_setting->add(''.__('messages.list_form_title',['form' => __('messages.role')]).'', ['class' => 'sidebar-layout' ,'route' => 'role.index']) ->data('permission', 'role list') ->prepend('') ->link->attr(['class' => '']); $menu->account_setting->add(''.__('messages.list_form_title',['form' => __('messages.permission')]).'', ['class' => 'sidebar-layout' ,'route' => 'permission.index']) ->data('permission', 'permission list') ->prepend('') ->link->attr(['class' => '']); $menu->add(''.__('messages.setting').''.__('messages.setting').'', ['route' => 'setting.index']) ->prepend('') ->nickname('setting') ->data('permission', 'system setting'); $menu->add(''.__('messages.slider').''.__('messages.slider').'', ['class' => '']) ->prepend('') ->nickname('sliders') ->data('permission', 'slider list') ->link->attr(["class" => ""]) ->href('#sliders'); $menu->sliders->add(''.__('messages.list_form_title',['form' => __('messages.slider')]).'', ['class' => 'sidebar-layout' ,'route' => 'slider.index']) ->data('permission', 'slider list') ->prepend('') ->link->attr(['class' => '']); $menu->sliders->add(''.__('messages.add_form_title',['form' => __('messages.slider')]).'', ['class' => 'sidebar-layout' ,'route' => 'slider.create']) ->data('permission', 'slider add') ->prepend('') ->link->attr(['class' => '']); })->filter(function ($item) { return checkMenuRoleAndPermission($item); }); @endphp