当前位置: 首页>>代码示例>>PHP>>正文


PHP lmbRoute函数代码示例

本文整理汇总了PHP中lmbRoute函数的典型用法代码示例。如果您正苦于以下问题:PHP lmbRoute函数的具体用法?PHP lmbRoute怎么用?PHP lmbRoute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lmbRoute函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     // rol ekle
     $menu->add(lmcTrans('laravel-user-module/admin.menu.role.add'), ['route' => 'admin.role.create'])->attribute('data-icon', config('laravel-user-module.icons.role'))->data('permissions', 'admin.role.create')->active(removeDomain(lmbRoute('admin.role.create')));
     // yönetici ekle
     $menu->add(lmcTrans('laravel-user-module/admin.menu.user.add'), ['route' => 'admin.user.create'])->attribute('data-icon', 'icon-user-follow')->data('permissions', 'admin.user.create')->active(removeDomain(lmbRoute('admin.user.create')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:13,代码来源:UserMenu.php

示例2: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     // rol ekle
     $menu->add(lmcTrans('laravel-description-module/admin.menu.description_category.add'), ['route' => 'admin.description_category.create'])->attribute('data-icon', config('laravel-description-module.icons.description_category'))->data('permissions', 'admin.description_category.create')->active(removeDomain(lmbRoute('admin.description_category.create')));
     // yönetici ekle
     $menu->add(lmcTrans('laravel-description-module/admin.menu.description.add'), ['route' => 'admin.description.create'])->attribute('data-icon', config('laravel-description-module.icons.description'))->data('permissions', 'admin.description.create')->active(removeDomain(lmbRoute('admin.description.create')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:13,代码来源:DescriptionMenu.php

示例3: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     // departman ekle
     $menu->add(lmcTrans('laravel-team-module/admin.menu.team_category.add'), ['route' => ['admin.team_category.create']])->attribute('data-icon', 'icon-users')->data('permissions', 'admin.team_category.create')->active(lmbRoute('admin.team_category.create'));
     // ekip ekle
     $menu->add(lmcTrans('laravel-team-module/admin.menu.team.add'), ['route' => ['admin.team.create']])->attribute('data-icon', 'icon-user')->data('permissions', 'admin.team.create')->active(lmbRoute('admin.team.create'));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:13,代码来源:TeamMenu.php

示例4: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     $menu->add(lmcTrans('laravel-menu-module/admin.menus.menu.root'), 'javascript:;')->attribute('is-header', true);
     // menu
     $menuM = $menu->add(lmcTrans('laravel-menu-module/admin.menus.menu.root'), ['route' => ['admin.menu.index']])->attribute('data-icon', config('laravel-menu-module.icons.menu'))->data('permissions', self::$menuPermissions)->active(removeDomain(lmbRoute('admin.menu.index')));
     $menuM->add(lmcTrans('laravel-menu-module/admin.menus.menu.all'), ['route' => ['admin.menu.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$menuPermissions[0])->active(removeDomain(lmbRoute('admin.menu.index')));
     $menuM->add(lmcTrans('laravel-menu-module/admin.menus.menu.add'), ['route' => ['admin.menu.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$menuPermissions[1])->active(removeDomain(lmbRoute('admin.menu.create')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:14,代码来源:MenuMenu.php

示例5: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $user = Sentinel::check();
     if (isset($user->id)) {
         return redirect(lmbRoute(config('laravel-user-module.url.redirect_route')));
     }
     return $next($request);
 }
开发者ID:erenmustafaozdal,项目名称:laravel-user-module,代码行数:15,代码来源:RedirectIfAuthenticated.php

示例6: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (!Sentinel::check()) {
         if ($request->ajax()) {
             return response('Unauthorized.', 401);
         } else {
             return redirect(lmbRoute('getLogin'));
         }
     }
     return $next($request);
 }
开发者ID:erenmustafaozdal,项目名称:laravel-user-module,代码行数:18,代码来源:Authenticate.php

示例7: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     // ürün kategorisi ekle
     $menu->add(lmcTrans('laravel-product-module/admin.menu.product_category.add'), ['route' => 'admin.product_category.create'])->attribute('data-icon', config('laravel-product-module.icons.product_category'))->data('permissions', 'admin.product_category.create')->active(removeDomain(lmbRoute('admin.product_category.create')));
     // marka ekle
     $menu->add(lmcTrans('laravel-product-module/admin.menu.product_brand.add'), ['route' => 'admin.product_brand.create'])->attribute('data-icon', config('laravel-product-module.icons.product_brand'))->data('permissions', 'admin.product_brand.create')->active(removeDomain(lmbRoute('admin.product_brand.create')));
     // vitrin ekle
     $menu->add(lmcTrans('laravel-product-module/admin.menu.product_showcase.add'), ['route' => 'admin.product_showcase.create'])->attribute('data-icon', config('laravel-product-module.icons.product_showcase'))->data('permissions', 'admin.product_showcase.create')->active(removeDomain(lmbRoute('admin.product_showcase.create')));
     // ürün ekle
     $menu->add(lmcTrans('laravel-product-module/admin.menu.product.add'), ['route' => 'admin.product.create'])->attribute('data-icon', config('laravel-product-module.icons.product'))->data('permissions', 'admin.product.create')->active(removeDomain(lmbRoute('admin.product.create')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:17,代码来源:ProductMenu.php

示例8: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     $menu->add(lmcTrans('laravel-document-module/admin.menu.document.root'), 'javascript:;')->attribute('is-header', true);
     // document_category
     $document_category = $menu->add(lmcTrans('laravel-document-module/admin.menu.document_category.root'), 'javascript:;')->attribute('data-icon', config('laravel-document-module.icons.document_category'))->data('permissions', self::$documentCategoryPermissions)->active(removeDomain(lmbRoute('admin.document_category.index')) . '/*');
     $document_category->add(lmcTrans('laravel-document-module/admin.menu.document_category.all'), ['route' => ['admin.document_category.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$documentCategoryPermissions[0])->active(removeDomain(lmbRoute('admin.document_category.index')));
     $document_category->add(lmcTrans('laravel-document-module/admin.menu.document_category.add'), ['route' => ['admin.document_category.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$documentCategoryPermissions[1])->active(removeDomain(lmbRoute('admin.document_category.create')));
     // document
     $document = $menu->add(lmcTrans('laravel-document-module/admin.menu.document.root'), 'javascript:;')->attribute('data-icon', config('laravel-document-module.icons.document'))->data('permissions', self::$documentPermissions)->active(removeDomain(lmbRoute('admin.document.index')) . '/*');
     $document->add(lmcTrans('laravel-document-module/admin.menu.document.all'), ['route' => ['admin.document.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$documentPermissions[0])->active(removeDomain(lmbRoute('admin.document.index')));
     $document->add(lmcTrans('laravel-document-module/admin.menu.document.add'), ['route' => ['admin.document.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$documentPermissions[1])->active(removeDomain(lmbRoute('admin.document.create')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:18,代码来源:DocumentMenu.php

示例9: getDefaultUrls

 /**
  * get default urls for Datatables
  *
  * @param \Illuminate\Database\Eloquent\Model $model
  * @return array
  */
 private function getDefaultUrls($model)
 {
     $slug = getModelSlug($model);
     return ['details' => lmbRoute("api.{$slug}.detail", ['id' => $model->id]), 'fast_edit' => lmbRoute("api.{$slug}.fastEdit", ['id' => $model->id]), 'edit' => lmbRoute("api.{$slug}.update", ['id' => $model->id]), 'destroy' => lmbRoute("api.{$slug}.destroy", ['id' => $model->id]), 'show' => lmbRoute("admin.{$slug}.show", ['id' => $model->id])];
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-base,代码行数:11,代码来源:DataTableTrait.php

示例10: isset

                </div>
            @endif
            {{-- /Actions --}}
        </div>
        {{-- /Portlet Title and Actions --}}

        {{-- Portlet Body --}}
        <div class="portlet-body form">

            {{-- Error Messages --}}
            @include('laravel-modules-core::partials.error_message')
            {{-- /Error Messages --}}

            {{-- Operation Form --}}
            <?php 
$form = ['method' => $operation === 'edit' ? 'PATCH' : 'POST', 'url' => isset($parent_dealer_category) ? lmbRoute('admin.dealer_category.dealer_category.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $parent_dealer_category->id, config('laravel-dealer-module.url.dealer_category') => $operation === 'edit' ? $dealer_category->id : null]) : lmbRoute('admin.dealer_category.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $dealer_category->id : null]), 'class' => 'form'];
?>
            @if($operation === 'edit')
                {!! Form::model($dealer_category,$form) !!}
            @else
                {!! Form::open($form) !!}
            @endif

            @include('laravel-modules-core::partials.form.actions', ['type' => 'top'])

            {{-- Form Body --}}
            <div class="form-body">
                @include('laravel-modules-core::dealer_category.partials.form', [
                    'parent'    => isset($parent_dealer_category) ? $parent_dealer_category : false
                ])
            </div>
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:31,代码来源:operation.blade.php

示例11: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     $menu->add(lmcTrans('laravel-company-module/admin.menu.company.root'), 'javascript:;')->attribute('is-header', true);
     // company
     $menu->add(lmcTrans('laravel-company-module/admin.menu.company.root'), ['route' => ['admin.company.edit']])->attribute('data-icon', config('laravel-company-module.icons.company'))->data('permissions', self::$companyPermissions)->active(removeDomain(lmbRoute('admin.company.edit')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:12,代码来源:CompanyMenu.php

示例12: lmbRoute

                </div>
            @endif
            {{-- /Actions --}}
        </div>
        {{-- /Portlet Title and Actions --}}

        {{-- Portlet Body --}}
        <div class="portlet-body form">

            {{-- Error Messages --}}
            @include('laravel-modules-core::partials.error_message')
            {{-- /Error Messages --}}

            {{-- Operation Form --}}
            <?php 
$form = ['method' => $operation === 'edit' ? 'PATCH' : 'POST', 'url' => lmbRoute('admin.product_category.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $product_category->id : null]), 'class' => 'form'];
?>
            @if($operation === 'edit')
                {!! Form::model($product_category,$form) !!}
            @else
                {!! Form::open($form) !!}
            @endif

            @include('laravel-modules-core::partials.form.actions', ['type' => 'top'])

            {{-- Form Body --}}
            <div class="form-body">
                @include('laravel-modules-core::product_category.partials.form')
            </div>
            {{-- /Form Body --}}
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:30,代码来源:operation.blade.php

示例13: getDashboardBreadcrumb

 /**
  * get dashboard breadcrumb
  *
  * @return string
  */
 public function getDashboardBreadcrumb()
 {
     if (!hasPermission('admin.dashboard.index')) {
         return '';
     }
     $breadcrumbs = '<li>';
     $breadcrumbs .= '<a href="' . lmbRoute('admin.dashboard.index') . '">';
     $breadcrumbs .= trans('laravel-modules-core::laravel-dashboard-module/admin.dashboard.index');
     $breadcrumbs .= '</a>';
     $breadcrumbs .= '<i class="fa fa-circle"></i>';
     $breadcrumbs .= '</li>';
     return $breadcrumbs;
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:18,代码来源:BreadcrumbService.php

示例14: getOps

 /**
  * get operation buttons
  *
  * @param \Illuminate\Support\Collection $model
  * @param string $currentPage
  * @param boolean $isPublishable
  * @param \Illuminate\Support\Collection|null $relatedModel
  * @param string $modelRouteRegex
  * @return string
  */
 function getOps($model, $currentPage, $isPublishable = false, $relatedModel = null, $modelRouteRegex = '')
 {
     $routeName = snake_case(class_basename($model));
     $routeParams = ['id' => $model->id];
     if (!is_null($relatedModel)) {
         $routeName = snake_case(class_basename($relatedModel)) . '.' . $routeName;
         $routeParams = ['id' => $relatedModel->id, $modelRouteRegex => $model->id];
     }
     $ops = Form::open(['method' => 'DELETE', 'url' => lmbRoute("admin.{$routeName}.destroy", $routeParams), 'style' => 'margin:0', 'id' => "destroy_form_{$model->id}"]);
     // edit buton
     if ($currentPage !== 'edit') {
         $hackedRoute = !is_null($relatedModel) && routeHackable("admin.{$routeName}.show") ? "admin.{$routeName}.show#####" . $relatedModel->id : "admin.{$routeName}.edit";
         if ($routeName === 'user' && $model->id === Sentinel::getUser()->id || hasPermission($hackedRoute)) {
             $ops .= '<a href="' . lmbRoute("admin.{$routeName}.edit", $routeParams) . '" class="btn btn-sm btn-outline yellow margin-right-10">';
             $ops .= '<i class="fa fa-pencil"></i>';
             $ops .= '<span class="hidden-xs">';
             $ops .= trans('laravel-modules-core::admin.ops.edit');
             $ops .= '</span>';
             $ops .= '</a>';
         }
     }
     // show buton
     if ($currentPage !== 'show') {
         $hackedRoute = !is_null($relatedModel) && routeHackable("admin.{$routeName}.show") ? "admin.{$routeName}.show#####" . $relatedModel->id : "admin.{$routeName}.show";
         if ($routeName === 'user' && $model->id === Sentinel::getUser()->id || hasPermission($hackedRoute)) {
             $ops .= '<a href="' . lmbRoute("admin.{$routeName}.show", $routeParams) . '" class="btn btn-sm btn-outline green margin-right-10">';
             $ops .= '<i class="fa fa-search"></i>';
             $ops .= '<span class="hidden-xs">';
             $ops .= trans('laravel-modules-core::admin.ops.show');
             $ops .= '</span>';
             $ops .= '</a>';
         }
     }
     // silme butonu
     $hackedRoute = !is_null($relatedModel) && routeHackable("admin.{$routeName}.destroy") ? "admin.{$routeName}.destroy#####" . $relatedModel->id : "admin.{$routeName}.destroy";
     if (hasPermission($hackedRoute)) {
         if ($routeName !== 'user' || $model->id !== Sentinel::getUser()->id) {
             $ops .= '<button type="submit" onclick="bootbox.confirm( \'' . trans('laravel-modules-core::admin.ops.destroy_confirmation') . '\', function(r){if(r) $(\'#destroy_form_' . $model->id . '\').submit();}); return false;" class="btn btn-sm red btn-outline margin-right-10">';
             $ops .= '<i class="fa fa-trash"></i>';
             $ops .= '<span class="hidden-xs">';
             $ops .= trans('laravel-modules-core::admin.ops.destroy');
             $ops .= '</span>';
             $ops .= '</button>';
         }
     }
     // yayınlama veya yayından kaldırma butonu
     if ($isPublishable) {
         // yayından kaldırma
         if ($model->is_publish) {
             $hackedRoute = !is_null($relatedModel) && routeHackable("admin.{$routeName}.notPublish") ? "admin.{$routeName}.notPublish#####" . $relatedModel->id : "admin.{$routeName}.notPublish";
             if (hasPermission($hackedRoute)) {
                 $ops .= '<a href="' . lmbRoute("admin.{$routeName}.notPublish", $routeParams) . '" class="btn btn-sm btn-outline purple margin-right-10">';
                 $ops .= '<i class="fa fa-times"></i>';
                 $ops .= '<span class="hidden-xs">';
                 $ops .= trans('laravel-modules-core::admin.ops.not_publish');
                 $ops .= '</span>';
                 $ops .= '</a>';
             }
         } else {
             $hackedRoute = !is_null($relatedModel) && routeHackable("admin.{$routeName}.publish") ? "admin.{$routeName}.publish#####" . $relatedModel->id : "admin.{$routeName}.publish";
             if (hasPermission($hackedRoute)) {
                 $ops .= '<a href="' . lmbRoute("admin.{$routeName}.publish", $routeParams) . '" class="btn btn-sm btn-outline blue margin-right-10">';
                 $ops .= '<i class="fa fa-bullhorn"></i>';
                 $ops .= '<span class="hidden-xs">';
                 $ops .= trans('laravel-modules-core::admin.ops.publish');
                 $ops .= '</span>';
                 $ops .= '</a>';
             }
         }
     }
     $ops .= Form::close();
     return $ops;
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:83,代码来源:helpers.php

示例15: addMenu

 /**
  * add menu method
  *
  * @param \Caffeinated\Menus\Menu $menu
  * @return void
  */
 public static function addMenu($menu)
 {
     // şube ekle
     $menu->add(lmcTrans('laravel-contact-module/admin.menu.contact.add'), ['route' => 'admin.contact.create'])->attribute('data-icon', config('laravel-contact-module.icons.contact'))->data('permissions', 'admin.contact.create')->active(removeDomain(lmbRoute('admin.contact.create')));
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-core,代码行数:11,代码来源:ContactMenu.php


注:本文中的lmbRoute函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。