master_currency = $master_currency; } /** * Returns count of master_crypto_currency. * * @param array $filter * * @return int */ public function count() { return 0; } /** * Make gadget View * * @param string $view * * @param int $count * * @return View */ public function gadget($view = 'admin.master_currency.gadget', $count = 10) { if (User::hasRole('user')) { $this->master_currency->pushCriteria(new \Litepie\Litecms\Repositories\Criteria\MasterCurrencyUserCriteria()); } $master_currency = $this->master_currency->scopeQuery(function ($query) use ($count) { return $query->orderBy('id', 'DESC')->take($count); })->all(); return view('master_crypto_currency::' . $view, compact('master_currency'))->render(); } }