public function updateForm($id_host) { $host = Host::with('client')->find($id_host); $clients = Client::orderBy('lower(name)', 'asc')->get(); if (empty($id_host)) { return 'Hostname não encontrado'; } return View::make('hosts.hostsUpdate')->with('host', $host)->with('clients', $clients); }
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); }
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); }
public function delete($id_client) { Client::destroy($id_client); return redirect()->action('ClientsController@read')->withInput(Request::only('id_client')); }