public function __construct(Palette $palette) { $account_ids = Auth::user()->accounts->lists('id'); $this->palette = $palette->whereIn('account_id', $account_ids); $this->namespace = 'palettes'; }