示例#1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (ViewsController::findSpec() != "SLS") {
         return 'Oops! Seems like you are not an SLS administrator';
     }
     return $next($request);
 }
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (ViewsController::findSpec() != "Extra-curricular") {
         return 'Oops! Seems like you are not the Extra-Curricular administrator';
     }
     return $next($request);
 }
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (ViewsController::findSpec() != "Financial Aid") {
         return 'Oops! Seems like you are not the financial aid administrator';
     }
     return $next($request);
 }
 /**
  * Delete a user's uploaded video resource from the database
  */
 public function deleteVideo(Request $request)
 {
     $video = Video::find($request->input('id'));
     $videoTitle = $video->title;
     $video->delete();
     $videos = ViewsController::getLoggedInUserVideos();
     return view('dashboard', ['videos' => $videos, 'message' => 'The video "' . $videoTitle . '" was deleted.']);
 }