Пример #1
0
 public function __construct(AuthManager $auth, OrderTransformer $orderTransformer, JsonRespond $jsonRespond)
 {
     parent::__construct($jsonRespond);
     $this->user = $auth->user();
     $this->orderTransformer = $orderTransformer;
     $this->jsonRespond = $jsonRespond;
 }
Пример #2
0
 public function __construct(ClassTransformer $classTransfomer, GenTransformer $genTransformer, AttendanceTransformer $attendanceTransformer)
 {
     parent::__construct();
     $this->classTransformer = $classTransfomer;
     $this->genTransformer = $genTransformer;
     $this->attendanceTransformer = $attendanceTransformer;
 }
Пример #3
0
 /**
  * DriversController constructor.
  * @param AuthManager $auth
  * @param User $users
  * @param JsonRespond $jsonRespond
  * @param UserTransformer $userTransformer
  */
 public function __construct(AuthManager $auth, User $users, JsonRespond $jsonRespond, UserTransformer $userTransformer)
 {
     $this->user = $auth->user();
     $this->userTransformer = $userTransformer;
     $this->users = $users;
     parent::__construct($jsonRespond);
 }
Пример #4
0
 public function __construct(DriverLocationTransformer $driverLocationTransformer, AuthManager $authManager, JsonRespond $jsonRespond)
 {
     parent::__construct($jsonRespond);
     $this->user = $authManager->user();
     $this->jsonRespond = $jsonRespond;
     $this->driverLocationTransformer = $driverLocationTransformer;
 }
Пример #5
0
 /**
  * AdminsController constructor.
  * @param UserListTransformer $userListTransformer
  * @param User $users
  * @param JsonRespond $jsonRespond
  * @param UserTransformer $userTransformer
  */
 public function __construct(UserListTransformer $userListTransformer, User $users, JsonRespond $jsonRespond, UserTransformer $userTransformer)
 {
     $this->userTransformer = $userTransformer;
     $this->users = $users;
     $this->userListTransformer = $userListTransformer;
     parent::__construct($jsonRespond);
 }
Пример #6
0
 /**
  * Assign dependencies.
  *
  * @param Auth $auth
  * @param JWTAuth $jwtAuth
  * @param AuthTokenTransformer $transformer
  * @param Application $app
  * @param Cache $cache
  */
 public function __construct(Auth $auth, JWTAuth $jwtAuth, AuthTokenTransformer $transformer, Application $app)
 {
     $this->auth = $auth;
     $this->jwtAuth = $jwtAuth;
     $this->app = $app;
     parent::__construct($transformer);
 }
Пример #7
0
 public function __construct(StaffTransformer $staffTransformer, TransactionTransformer $transactionTransformer, NotificationTransformer $notificationTransformer)
 {
     parent::__construct();
     $this->staffTransformer = $staffTransformer;
     $this->transactionTransformer = $transactionTransformer;
     $this->transactionTransformer->setUserId($this->user->id);
     $this->notificationTransformer = $notificationTransformer;
 }
 /**
  * Prepares for custom data transformations.
  */
 public function __construct()
 {
     // Without this $controllerErrors will not get merged into the error list
     parent::__construct();
     // Differently from the LeaseTransformer, ResourceTransformer this one is not controlled by Fractal for 2 reasons:
     // a) transformation is needed even BEFORE data is used by ApiController
     // b) since the collection structure is change, Fractal's transform() is not sufficient
     $this->transformer = new ResourceTransformer();
 }
Пример #9
0
 public function __construct(BaseModel $parentModel, TransformerInterface $transformer)
 {
     $this->parentModel = $parentModel;
     if (!$this->relationName) {
         throw new \InvalidArgumentException('You must specify relationName in ' . static::class);
     }
     if (!method_exists($parentModel, $this->relationName)) {
         throw new \InvalidArgumentException('Relation ' . $this->relationName . ', required by ' . static::class . ', does not exist in ' . get_class($parentModel));
     }
     parent::__construct($transformer);
 }
Пример #10
0
 /**
  * Assign dependencies.
  *
  * @param  Countries $countries
  * @param  EloquentModelTransformer $transformer
  */
 public function __construct(Countries $countries, EloquentModelTransformer $transformer)
 {
     $this->countries = $countries;
     parent::__construct($transformer);
 }
Пример #11
0
 public function __construct(BaseModel $model, TransformerInterface $transformer)
 {
     $this->model = $model;
     parent::__construct($transformer);
 }
Пример #12
0
 public function __construct(CommentTransformer $commentTransformer, NotificationTransformer $notificationTransformer)
 {
     parent::__construct();
     $this->commentTransformer = $commentTransformer;
     $this->notificationTransformer = $notificationTransformer;
 }
Пример #13
0
 public function __construct()
 {
     parent::__construct();
     $this->beforeFilter('auth', array('on' => array('post', 'put', 'delete')));
 }
Пример #14
0
 public function __construct(StudentTransformer $studentTransformer)
 {
     parent::__construct();
     $this->studentTransformer = $studentTransformer;
 }
Пример #15
0
 /**
  * Assign dependencies.
  *
  * @param Timezones $timezones
  * @param EloquentModelTransformer $transformer
  */
 public function __construct(Timezones $timezones, EloquentModelTransformer $transformer)
 {
     $this->timezones = $timezones;
     parent::__construct($transformer);
 }
 /**
  * OrderStatusesController constructor.
  * @param StatusTransformer $statusTransformer
  * @param JsonRespond $jsonRespond
  */
 public function __construct(StatusTransformer $statusTransformer, JsonRespond $jsonRespond)
 {
     parent::__construct($jsonRespond);
     $this->statusTransformer = $statusTransformer;
     $this->jsonRespond = $jsonRespond;
 }
Пример #17
0
 public function __construct()
 {
     parent::__construct();
 }
Пример #18
0
 /**
  * AdminsController constructor.
  * @param Order $orders
  * @param JsonRespond $jsonRespond
  * @param OrderTransformer $userTransformer
  */
 public function __construct(Order $orders, JsonRespond $jsonRespond, OrderTransformer $userTransformer)
 {
     $this->orderTransformer = $userTransformer;
     $this->orders = $orders;
     parent::__construct($jsonRespond);
 }
Пример #19
0
 /**
  * The constructor.
  *
  * @param Request $request Laravel Request object
  */
 public function __construct(Request $request)
 {
     parent::__construct();
 }
Пример #20
0
 /**
  * DriverOrdersController constructor.
  * @param OrderTransformer $orderTransformer
  * @param JsonRespond $jsonRespond
  */
 public function __construct(OrderTransformer $orderTransformer, JsonRespond $jsonRespond)
 {
     parent::__construct($jsonRespond);
     $this->orderTransformer = $orderTransformer;
     $this->jsonRespond = $jsonRespond;
 }
 /**
  * DispatcherDriversController constructor.
  * @param UserTransformer $userTransformer
  * @param JsonRespond $jsonRespond
  */
 public function __construct(UserTransformer $userTransformer, JsonRespond $jsonRespond)
 {
     parent::__construct($jsonRespond);
     $this->jsonRespond = $jsonRespond;
     $this->userTransformer = $userTransformer;
 }
Пример #22
0
 public function __construct(NotificationTransformer $notificationTransformer)
 {
     parent::__construct();
     $this->notificationTransformer = $notificationTransformer;
 }
Пример #23
0
 public function __construct(CourseTransformer $courseTransformer)
 {
     parent::__construct();
     $this->courseTransformer = $courseTransformer;
 }
Пример #24
0
 function __construct(PostTransformer $postTransformer)
 {
     parent::__construct();
     $this->postTransformer = $postTransformer;
 }
Пример #25
0
 public function __construct(RegisterToStudentTransformer $registerToStudentTransformer, ClassTransformer $classTransformer)
 {
     parent::__construct();
     $this->registerToStudentTransformer = $registerToStudentTransformer;
     $this->classTransformer = $classTransformer;
 }