/** * Change active Artist status * * @param integer $id * @return Response */ public function status($id) { $artist = Artist::where('id', $id)->select('id', 'name', 'active')->first(); $artist->update(['active' => $artist->active ? false : true]); $action = $artist->active ? 'activó' : 'desactivó'; session()->flash('message', "Se {$action} el artista \"{$artist->name}\" correctamente"); return redirect()->back(); }