示例#1
0
 /**
  * Store an article on the storage.
  *
  * @param array $fillable Validated array parameters: author_id, industry_id, thumbnail_id
  *
  * @return Article|false
  */
 public function store(array $fillable)
 {
     $article = new Article($fillable);
     $article->assignAuthor(User::find($fillable['author_id']));
     $article->assignIndustry(Industry::find($fillable['industry_id']));
     $article->assignThumbnail(File::find($fillable['thumbnail_id']));
     return $article->save() ? $article : false;
 }