예제 #1
0
 /**
  * Create a new command instance.
  *
  * @return void
  */
 public function __construct($userId)
 {
     $this->user = User::findOrFail($userId);
 }
예제 #2
0
 /**
  * Create a new command instance.
  *
  * @return void
  */
 public function __construct($userId, $favoriteId)
 {
     $this->user = User::findOrFail($userId);
     $this->favorite = Cache::get("user:{$userId}:favorite:{$favoriteId}");
 }