public function create() { if ($this->publisher->isValid(Input::get('publisher')) === true) { // Create publisher $publisher = Publisher::create(['name' => Input::get('publisher.name'), 'description' => Input::get('publisher.description'), 'url' => Input::get('publisher.url')]); // Fetch and save their icon $publisher->saveFavicon(); return response()->json($publisher, 200); } return response()->json(null, 422); }