/** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { $elementId = $this->route('element'); if (Auth::check()) { if (Auth::user() == Element::find($elementId)->user) { return true; } else { return false; } } else { return false; } }