|-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::get('/', ['middleware' => 'auth', 'uses' => 'CompanyController@index']); Route::model('company', 'Company'); Route::model('customer', 'Customer'); Route::model('driver', 'Driver'); Route::model('truck', 'Truck'); Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']); Route::bind('company', function ($value, $route) { return App\Company::whereId($value)->first(); }); Route::bind('customer', function ($value, $route) { return App\Customer::whereId($value)->first(); }); Route::bind('driver', function ($value, $route) { return App\Driver::whereId($value)->first(); }); Route::bind('truck', function ($value, $route) { return App\Truck::whereId($value)->first(); }); Route::resource('company', 'CompanyController'); Route::resource('customer', 'CustomerController'); Route::resource('driver', 'DriverController'); Route::resource('truck', 'TruckController');
<?php require __DIR__ . '/../app/bootstrap.php'; $driver = new \App\Driver(); $driver->run(); ?> <!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/bootstrap.min.css"> <style> body { padding-top: 50px; padding-bottom: 20px; } </style> <link rel="stylesheet" href="css/bootstrap-theme.min.css"> <script src="js/vendor/modernizr-2.8.3.min.js"></script> </head> <body> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span>