예제 #1
0
 /**
  * Display the specified permission.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $permission = Permission::findOrFail($id);
     if (!$permission->canShow()) {
         return _access_denied();
     }
     if (Request::ajax()) {
         return $permission;
     }
     Asset::push('js', 'show');
     return View::make('permissions.show', compact('permission'));
 }
예제 #2
0
파일: boot.php 프로젝트: k4ml/laravel-base
<?php

View::share('currentuser', Auth::user());
Asset::push('js', 'application');
Asset::push('css', 'application');
if (Session::has('errors')) {
    foreach (Session::get('errors')->all() as $message) {
        Log::error($message);
    }
}
View::addLocation(app_path() . '/base/views');
 /**
  * Display the specified reportgrouping.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($report_id, $id)
 {
     $reportgrouping = ReportGrouping::findOrFail($id);
     if (!$reportgrouping->canShow()) {
         return $this->_access_denied();
     }
     if (Request::ajax()) {
         return Response::json($reportgrouping);
     }
     $report = Report::findOrFail($report_id);
     Asset::push('js', 'show');
     return View::make('reportgroupings.show', compact('reportgrouping', 'report_id', 'report'));
 }
예제 #4
0
 /**
  * Display the specified role.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $role = Role::findOrFail($id);
     if (!$role->canShow()) {
         return $this->_access_denied();
     }
     if (Request::ajax()) {
         return $role;
     }
     Asset::push('js', 'show');
     return View::make('roles.show', compact('role'));
 }
예제 #5
0
 /**
  * Display the specified reportfield.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($report_id, $id)
 {
     $reportfield = ReportField::findOrFail($id);
     $report = Report::findOrFail($report_id);
     if (!$reportfield->canShow()) {
         return $this->_access_denied();
     }
     if (Request::ajax()) {
         return Response::json($reportfield);
     }
     Asset::push('js', 'show');
     return View::make('reportfields.show', compact('report_id', 'report', 'reportfield'));
 }
예제 #6
0
 public function __construct()
 {
     parent::__construct();
     View::share('controller', 'AuthController');
     Asset::push('js', 'login');
     Asset::push('css', 'login');
 }
예제 #7
0
 public function __construct()
 {
     parent::__construct();
     Asset::push('js', 'reports.js');
     Asset::push('css', 'reports.less');
 }
예제 #8
0
 /**
  * Display the specified user.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $user = User::findOrFail($id);
     if (!$user->canShow()) {
         return $this->_access_denied();
     }
     if (Request::ajax()) {
         return $user;
     }
     Asset::push('js', 'show');
     return View::make('users.show', compact('user'));
 }