/** * 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'))); }
/** * 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'))); }
/** * 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')); }
/** * add menu method * * @param \Caffeinated\Menus\Menu $menu * @return void */ public static function addMenu($menu) { // bayi kategorisi ekle $menu->add(lmcTrans('laravel-dealer-module/admin.menu.dealer_category.add'), ['route' => 'admin.dealer_category.create'])->attribute('data-icon', config('laravel-dealer-module.icons.dealer_category'))->data('permissions', 'admin.dealer_category.create')->active(removeDomain(lmbRoute('admin.dealer_category.create'))); // bayi ekle $menu->add(lmcTrans('laravel-dealer-module/admin.menu.dealer.add'), ['route' => 'admin.dealer.create'])->attribute('data-icon', config('laravel-dealer-module.icons.dealer'))->data('permissions', 'admin.dealer.create')->active(removeDomain(lmbRoute('admin.dealer.create'))); }
/** * 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'))); }
/** * 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); }
/** * add menu method * * @param \Caffeinated\Menus\Menu $menu * @return void */ public static function addMenu($menu) { $menu->add(lmcTrans('laravel-user-module/admin.menu.user.root'), 'javascript:;')->attribute('is-header', true); $role = $menu->add(lmcTrans('laravel-user-module/admin.menu.role.root'), 'javascript:;')->attribute('data-icon', config('laravel-user-module.icons.role'))->data('permissions', self::$rolePermissions)->active(removeDomain(lmbRoute('admin.role.index')) . '/*'); $role->add(lmcTrans('laravel-user-module/admin.menu.role.all'), ['route' => ['admin.role.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$rolePermissions[0])->active(removeDomain(lmbRoute('admin.role.index'))); $role->add(lmcTrans('laravel-user-module/admin.menu.role.add'), ['route' => ['admin.role.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$rolePermissions[1])->active(removeDomain(lmbRoute('admin.role.create'))); // user $user = $menu->add(lmcTrans('laravel-user-module/admin.menu.user.root'), 'javascript:;')->attribute('data-icon', config('laravel-user-module.icons.user'))->data('permissions', self::$userPermissions)->active(removeDomain(lmbRoute('admin.user.index')) . '/*'); $user->add(lmcTrans('laravel-user-module/admin.menu.user.all'), ['route' => ['admin.user.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$userPermissions[0])->active(removeDomain(lmbRoute('admin.user.index'))); $user->add(lmcTrans('laravel-user-module/admin.menu.user.add'), ['route' => ['admin.user.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$userPermissions[1])->active(removeDomain(lmbRoute('admin.user.create'))); }
/** * 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); }
/** * 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'))); }
/** * 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'))); }
/** * add menu method * * @param \Caffeinated\Menus\Menu $menu * @return void */ public static function addMenu($menu) { $menu->add(lmcTrans('laravel-product-module/admin.menu.product.root'), 'javascript:;')->attribute('is-header', true); // product_category $product_category = $menu->add(lmcTrans('laravel-product-module/admin.menu.product_category.root'), 'javascript:;')->attribute('data-icon', config('laravel-product-module.icons.product_category'))->data('permissions', self::$productCategoryPermissions)->active(removeDomain(lmbRoute('admin.product_category.index')) . '/*'); $product_category->add(lmcTrans('laravel-product-module/admin.menu.product_category.all'), ['route' => ['admin.product_category.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$productCategoryPermissions[0])->active(removeDomain(lmbRoute('admin.product_category.index'))); $product_category->add(lmcTrans('laravel-product-module/admin.menu.product_category.add'), ['route' => ['admin.product_category.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$productCategoryPermissions[1])->active(removeDomain(lmbRoute('admin.product_category.create'))); // product_brand $product_brand = $menu->add(lmcTrans('laravel-product-module/admin.menu.product_brand.root'), 'javascript:;')->attribute('data-icon', config('laravel-product-module.icons.product_brand'))->data('permissions', self::$productBrandPermissions)->active(removeDomain(lmbRoute('admin.product_brand.index')) . '/*'); $product_brand->add(lmcTrans('laravel-product-module/admin.menu.product_brand.all'), ['route' => ['admin.product_brand.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$productBrandPermissions[0])->active(removeDomain(lmbRoute('admin.product_brand.index'))); $product_brand->add(lmcTrans('laravel-product-module/admin.menu.product_brand.add'), ['route' => ['admin.product_brand.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$productBrandPermissions[1])->active(removeDomain(lmbRoute('admin.product_brand.create'))); // product_showcase $product_showcase = $menu->add(lmcTrans('laravel-product-module/admin.menu.product_showcase.root'), 'javascript:;')->attribute('data-icon', config('laravel-product-module.icons.product_showcase'))->data('permissions', self::$productShowcasePermissions)->active(removeDomain(lmbRoute('admin.product_showcase.index')) . '/*'); $product_showcase->add(lmcTrans('laravel-product-module/admin.menu.product_showcase.all'), ['route' => ['admin.product_showcase.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$productShowcasePermissions[0])->active(removeDomain(lmbRoute('admin.product_showcase.index'))); $product_showcase->add(lmcTrans('laravel-product-module/admin.menu.product_showcase.add'), ['route' => ['admin.product_showcase.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$productShowcasePermissions[1])->active(removeDomain(lmbRoute('admin.product_showcase.create'))); // product $product = $menu->add(lmcTrans('laravel-product-module/admin.menu.product.root'), 'javascript:;')->attribute('data-icon', config('laravel-product-module.icons.product'))->data('permissions', self::$productPermissions)->active(removeDomain(lmbRoute('admin.product.index')) . '/*'); $product->add(lmcTrans('laravel-product-module/admin.menu.product.all'), ['route' => ['admin.product.index']])->attribute('data-icon', 'icon-list')->data('permissions', self::$productPermissions[0])->active(removeDomain(lmbRoute('admin.product.index'))); $product->add(lmcTrans('laravel-product-module/admin.menu.product.add'), ['route' => ['admin.product.create']])->attribute('data-icon', 'icon-plus')->data('permissions', self::$productPermissions[1])->active(removeDomain(lmbRoute('admin.product.create'))); }
/** * 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])]; }
</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>
/** * 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'))); }
</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 --}}
/** * 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; }
/** * 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; }
</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.team.' . ($operation === 'edit' ? 'update' : ($operation === 'copy' ? 'storeCopy' : 'store')), ['id' => $operation === 'edit' || $operation === 'copy' ? $team->id : null]), 'class' => 'form', 'files' => true]; ?> {!! Form::open($form) !!} @include('laravel-modules-core::partials.form.actions', ['type' => 'top']) {{-- Form Body --}} <div class="form-body"> @include('laravel-modules-core::team.partials.form') @include('laravel-modules-core::team.partials.detail_form') </div> {{-- /Form Body --}} @include('laravel-modules-core::partials.form.actions', ['type' => 'fluid'])
/** * 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'))); }
</li> </ul> {{-- /Nav Tabs --}} </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($description_category) ? lmbRoute('admin.description_category.description.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $description_category->id, config('laravel-description-module.url.description') => $operation === 'edit' ? $description->id : null]) : lmbRoute('admin.description.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $description->id : null]), 'class' => 'form', 'files' => true]; ?> {!! Form::open($form) !!} @include('laravel-modules-core::partials.form.actions', ['type' => 'top']) {{-- Form Body --}} <div class="form-body"> {{-- Tab Contents --}} <div class="tab-content"> <div class="tab-pane active" id="info"> @include('laravel-modules-core::description.partials.form', [ 'isRelation' => isset($description_category) ? true : false ]) @include('laravel-modules-core::partials.form.model_extras_form', [
/** * post reset password metod * * @param ResetPasswordRequest $request * @return Redirector * @throw ResetPasswordException */ public function postResetPassword(ResetPasswordRequest $request) { try { $user = Sentinel::findByCredentials(['login' => $request->input('email')]); if (is_null($user)) { throw new ResetPasswordUserNotFoundException($request->all()); } if (!Reminder::complete($user, $request->input('token'), $request->input('password'))) { throw new ResetPasswordIncorrectCodeException($request->all()); } Flash::success(trans('laravel-user-module::auth.reset_password.success', ['email' => $request->input('email')])); // event fire event(new ResetPasswordSuccess($user)); return redirect(lmbRoute('getLogin')); } catch (ResetPasswordUserNotFoundException $e) { Flash::error(trans('laravel-user-module::auth.reset_password.user_not_found', ['email' => $request->input('email')])); // event fire event(new ResetPasswordUserNotFound($e->getDatas())); return redirect(lmbRoute('getResetPassword', ['token' => $request->input('token')]))->withInput(); } catch (ResetPasswordIncorrectCodeException $e) { Flash::error(trans('laravel-user-module::auth.reset_password.incorrect_code')); // event fire event(new ResetPasswordIncorrectCode($user)); return redirect(lmbRoute('getForgetPassword'))->withInput(); } }
</li> </ul> {{-- /Nav Tabs --}} </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.role.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $role->id : null]), 'class' => 'form']; ?> {!! Form::open($form) !!} @include('laravel-modules-core::partials.form.actions', ['type' => 'top']) {{-- Form Body --}} <div class="form-body"> {{-- Tab Contents --}} <div class="tab-content"> <div class="tab-pane active" id="info"> @include('laravel-modules-core::role.partials.form') </div> <div class="tab-pane" id="permission"> @include('laravel-modules-core::partials.laravel-user-module.permissions')
@endif </ul> {{-- /Nav Tabs --}} </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_media_category) ? lmbRoute('admin.media_category.media_category.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $parent_media_category->id, config('laravel-media-module.url.media_category') => $operation === 'edit' ? $media_category->id : null, 'form' => 'general']) : lmbRoute('admin.media_category.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $media_category->id : null, 'form' => 'general']), 'class' => 'form']; ?> @if($operation === 'edit') {!! Form::model($media_category,$form) !!} @else {!! Form::open($form) !!} @endif @include('laravel-modules-core::partials.form.actions', ['type' => 'top']) {{-- Form Body --}} <div class="form-body"> {{-- Tab Contents --}} <div class="tab-content"> <div class="tab-pane active" id="info">
</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.menu.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $menu->id : null]), 'class' => 'form', 'files' => true]; ?> {!! Form::open($form) !!} @include('laravel-modules-core::partials.form.actions', ['type' => 'top']) {{-- Form Body --}} <div class="form-body"> @include('laravel-modules-core::menu.partials.form') </div> {{-- /Form Body --}} @include('laravel-modules-core::partials.form.actions', ['type' => 'fluid']) {!! Form::close() !!} {{-- /Operation Form --}}
/** * return redirect url path * * @param string $path * @param boolean $isUpdate * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ protected function redirectRoute($path, $isUpdate = false) { $indexPos = strpos($path, 'index'); $dotPos = strpos($path, '.'); $slug = getModelSlug($this->model); // İlişkisiz yalın sayfalardan index hariç if ($indexPos === false && $dotPos === false) { return redirect(lmbRoute("admin.{$slug}.{$path}", ['id' => $this->model->id])); } // İlişkili sayfalardan index hariç if ($indexPos === false) { $id = $isUpdate && !is_null($this->model->category_id) && is_null($this->relatedId) ? $this->model->category_id : ($isUpdate && is_null($this->relatedId) ? $this->model->categories->first()->id : $this->relatedId); return redirect(lmbRoute("admin.{$path}", ['id' => $id, $this->routeRegex => $this->model->id])); } // İlişkisiz sayfalardan index if ($dotPos === false) { return redirect(lmbRoute("admin.{$slug}.{$path}")); } // İlişkili sayfalardan index return redirect(lmbRoute("admin.{$path}", ['id' => $this->relatedId])); }
/** * add menu method * * @param \Caffeinated\Menus\Menu $menu * @return void */ public static function addMenu($menu) { $menu->add(lmcTrans('admin.profile'), ['route' => ['admin.user.show', 'id' => Sentinel::getUser()->id]])->attribute('data-icon', config('laravel-user-module.icons.user'))->data('permissions', self::$userPermissions)->active(removeDomain(lmbRoute('admin.user.show', ['id' => Sentinel::getUser()->id])) . '/*'); $menu->add(lmcTrans('admin.logout'), ['route' => 'getLogout'])->attribute('data-icon', 'icon-logout'); }
/** * get account activate metod * * @param integer $id * @param string $code * @return Redirector */ public function accountActivate($id, $code) { try { $user = Sentinel::findById($id); if (is_null($user) || !Activation::exists($user)) { throw new ActivateException($id, $code, 'not_found'); } if (!Activation::complete($user, $code)) { throw new ActivateException($id, $code, 'fail'); } $user->is_active = true; $user->save(); Sentinel::login($user); Flash::success(trans('laravel-user-module::auth.activation.success')); // event fire event(new ActivateSuccess($user)); return redirect(lmbRoute(config('laravel-user-module.url.redirect_route'))); } catch (ActivateException $e) { Flash::error(trans('laravel-user-module::auth.activation.' . $e->getType())); // event fire event(new ActivateFail($e->getId(), $e->getActivationCode(), $e->getType())); return redirect(lmbRoute('getLogin')); } }
</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($media_category) ? lmbRoute('admin.media_category.media.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $media_category->id, config('laravel-media-module.url.media') => $operation === 'edit' ? $media->id : null]) : lmbRoute('admin.media.' . ($operation === 'edit' ? 'update' : 'store'), ['id' => $operation === 'edit' ? $media->id : null]), 'class' => 'form', 'files' => true]; ?> {!! Form::open($form) !!} @include('laravel-modules-core::partials.form.actions', ['type' => 'top']) {{-- Form Body --}} <div class="form-body"> @include('laravel-modules-core::media.partials.form') @include('laravel-modules-core::partials.form.model_extras_form', [ 'category' => isset($media_category) ? $media_category : false, 'model' => isset($media) ? $media : false ]) </div> {{-- /Form Body --}}
<?php return ['register' => ['title' => 'Kayıt Ol', 'first_name' => 'Ad', 'last_name' => 'Soyad', 'email' => 'E-posta', 'password' => 'Şifre', 'password_confirmation' => 'Şifreni onayla', 'terms_content' => '<a href="javascript:;"> Kullanıcı Sözleşmesi </a> ve <a href="javascript:;"> Gizlilik Politikası </a>\'nı kabul ediyorum.', 'submit' => 'Kayıt Ol', 'login' => 'Giriş Yap!', 'fail' => 'Hesabın oluşturulamadı! Lütfen daha sonra tekrar dene.', 'success' => '<p>Hesabın oluşturuldu! Hesabını aktifleştirmen için <strong>:email</strong> e-posta adresine bir posta gönderdik. E-posta adresini ziyaret et ve hesabını aktifleştir.</p><p>Aktivasyon postasının gelmesi sunucumuzdaki yoğunluğa göre, bazen 5 dakika kadar sürebilmektedir. Lütfen e-postanın <em>Spam</em> klasörünü de kontrol etmeyi unutma!</p>'], 'activation' => ['mail_subject' => 'Lütfen Hesabını Aktifleştir', 'mail_content' => 'Merhaba :name! Lütfen hesabını aktifleştir: <a href=":route">:route</a>'], 'login' => ['title' => 'Giriş Yap', 'email' => 'E-posta', 'password' => 'Şifre', 'submit' => 'Giriş Yap', 'remember' => 'Hatırla', 'forget_password' => 'Şifreni mi unuttun?', 'register' => 'Kayıt Ol!'], 'forget_password' => ['title' => 'Şifreni mi unuttun?', 'message' => 'E-posta adresini yaz ve şifre sıfırlama bağlantısı ile tekrar hesabına giriş yap.', 'email' => 'E-posta', 'submit' => 'Gönder', 'login' => 'Giriş Yap!', 'mail_subject' => 'Şifreni Sıfırla', 'mail_content' => 'Merhaba :name! Şifreni sıfırla: <a href="' . lmbRoute('getResetPassword', ['token' => ':token']) . '">' . lmbRoute('getResetPassword', ['token' => ':token']) . '</a>'], 'reset_password' => ['title' => 'Şifreni Sıfırla', 'message' => 'E-posta adresini yaz ve ve yeni şifreni belirle.', 'email' => 'E-posta', 'password' => 'Yeni şifre', 'password_confirmation' => 'Yeni şifreni onayla', 'submit' => 'Şifreni Sıfırla', 'login' => 'Giriş Yap!']];