예제 #1
0
 public function updateForm($db_name)
 {
     $database = Database::with('host', 'client')->find($db_name);
     $hosts = Host::orderBy('lower(hostname)')->get();
     $clients = Client::orderBy('lower(name)', 'asc')->get();
     if (empty($db_name)) {
         return 'Database(DB_NAME) not found!';
     }
     return View::make('databases.databasesUpdate')->with('database', $database)->with('hosts', $hosts)->with('clients', $clients);
 }
예제 #2
0
 public function updateForm($id_policy)
 {
     $policy = Policy::find($id_policy);
     $clients = Client::orderBy('name')->get();
     $hostnames = Host::orderBy('hostname')->get();
     $databases = Database::orderBy('db_name')->get();
     if (empty($policy)) {
         return 'Backup Policy not found!';
     }
     return View::make('policies.policiesUpdate')->with('policy', $policy)->with('clients', $clients)->with('hostnames', $hostnames)->with('databases', $databases);
 }
예제 #3
0
 public function delete($hostname)
 {
     Host::destroy($hostname);
     return redirect()->action('HostsController@read')->withInput(Request::only('hostname'));
 }