1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Services\Common;
- use App\Repositories\TplRepository;
- use Illuminate\Support\Facades\DB;
- class TplService
- {
-
- /**
- * @var $tplRepository
- */
- protected $tplRepository;
- protected $tplStatus = true;
-
- /**
- * TaskService constructor.
- * @param TplRepository $tplRepository
- */
- public function __construct(TplRepository $tplRepository)
- {
- $this->tplRepository = $tplRepository;
- }
-
- public function getTpl($user)
- {
- $tpl = $this->tplRepository->findTpl(['tpl_type'=>$user->utype]);
- if($tpl->isEmpty()){
- $this->tplStatus = false;
- }
- return $this->tplStatus;
- }
-
-
- }
|