Exemplo n.º 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);
     $router->bind('phone', function ($mac) {
         return \App\Phone::where('mac', $mac)->first();
     });
     $router->bind('bulk', function ($process_id) {
         return \App\Bulk::where('process_id', $process_id)->first();
     });
     $router->bind('cluster', function ($id) {
         return \App\Cluster::where('id', $id)->first();
     });
     $router->bind('user', function ($name) {
         return \App\User::where('name', $name)->first();
     });
     $router->bind('sql', function ($id) {
         return \App\Sql::where('id', $id)->first();
     });
 }
Exemplo n.º 2
0
 public function history()
 {
     $sqls = Sql::all();
     return view('sql.history', compact('sqls'));
 }