Пример #1
0
 /**
  * Define your route model bindings, pattern filters, etc.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function boot(Router $router)
 {
     parent::boot($router);
     /**
      * Bind the course route.
      */
     $router->bind('courses', function ($value, $route) {
         $course = \Course::getCourse($value);
         if ($course === null) {
             throw new NotFoundHttpException();
         }
         return $course;
     });
     /**
      * Bind the user route.
      */
     $router->bind('users', function ($value, $route) {
         $user = \User::getUser($value);
         if ($user === null) {
             throw new NotFoundHttpException();
         }
         return $user;
     });
 }
Пример #2
0
<?php

/**
 * Created by PhpStorm.
 * User: Amali
 * Date: 10/8/14
 * Time: 2:17 PM
 */
require_once "course_view.php";
if (empty($_POST["Course"])) {
    echo "Please Enter Course ID";
} else {
    $cors = $_POST["Course"];
    $course = new Course();
    $course->getCourse("SELECT * FROM subject WHERE Course_Course_ID = '{$cors}'", $cors);
}
Пример #3
0
<?php

require_once "course_view.php";
session_start();
$cors = $_SESSION['user_name'];
$course = new Course();
$course->getCourse("SELECT * FROM subject WHERE Aca_Staff_Ac_ID = '{$cors}'", $cors);