Inheritance: extends Controller
Example #1
0
 public function __construct(AccountRepository $accountRepo, ContactMailer $contactMailer, UserMailer $userMailer)
 {
     parent::__construct();
     $this->accountRepo = $accountRepo;
     $this->contactMailer = $contactMailer;
     $this->userMailer = $userMailer;
 }
 public function __construct()
 {
     parent::__construct();
     //redis db selection - please note this is to be changed for different states when it is applied
     //for now we are only considering CA state code so redis db = 5 as static
     $this->redisDb = 6;
 }
Example #3
0
 public function __construct(TaskRepository $taskRepo, InvoiceRepository $invoiceRepo, TaskService $taskService)
 {
     parent::__construct();
     $this->taskRepo = $taskRepo;
     $this->invoiceRepo = $invoiceRepo;
     $this->taskService = $taskService;
 }
Example #4
0
 public function __construct(AccountRepository $accountRepo, Mailer $mailer, EmailService $emailService)
 {
     parent::__construct();
     $this->accountRepo = $accountRepo;
     $this->mailer = $mailer;
     $this->emailService = $emailService;
 }
Example #5
0
 /**
  * Render an exception into an HTTP response.
  *
  * @param \Illuminate\Http\Request $request            
  * @param \Exception $e            
  * @return \Illuminate\Http\Response
  */
 public function render($request, Exception $e)
 {
     \App\Http\Controllers\BaseController::setHeader();
     /**
      * Handle Service Exceptions
      */
     if ($e instanceof \App\Exceptions\ServiceException) {
         $response = array('status' => $e->getCode(), 'message' => $e->getMessage());
         ServiceLog::requestLog($request, $response);
         return \Response::json($response);
     }
     if (!\Config::get('app.debug')) {
         if ($e instanceof ModelNotFoundException) {
             $e = new NotFoundHttpException($e->getMessage(), $e);
         }
         if ($e instanceof \Illuminate\Contracts\Container\BindingResolutionException) {
             $response = array('status' => 604, 'message' => '相应服务没有启动');
         } elseif ($e instanceof \Symfony\Component\Debug\Exception\FatalErrorException) {
             $response = array('status' => 605, 'message' => 'method wrong');
         } else {
             $response = array('status' => $e->getCode() ?: 606, 'message' => $e->getMessage() ?: '请检查请求数据');
         }
         ServiceLog::errorLog($request, $response);
         return \Response::json($response);
     }
     return parent::render($request, $e);
 }
Example #6
0
 /**
  * Create a new authentication controller instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->middleware('guest', ['except' => 'getLogout']);
     $popup = Popup::where('status', 1)->first();
     view()->share('popup', $popup);
 }
Example #7
0
 public function __construct(Model $model, $base = 'jabatan')
 {
     parent::__construct($model, $base);
     view()->share('breadcrumb2Icon', 'tag');
     view()->share('fields', ['id' => 'ID', 'jabatan' => 'Jabatan', 'status' => 'Status']);
     view()->share('unsortables', ['status']);
 }
Example #8
0
 public function __construct(Model $model, $base = 'profile')
 {
     parent::__construct($model, $base);
     view()->share('breadcrumb2Icon', 'image');
     view()->share('noAddButton', true);
     view()->share('withoutMenu', true);
 }
Example #9
0
 /**
  * Create a new BrowseController instance.
  *
  * @param \App\Repositories\CategoryRepositoryInterface $categories
  * @param \App\Repositories\TagRepositoryInterface      $tags
  * @param \App\Repositories\TrickRepositoryInterface    $tricks
  */
 public function __construct(CategoryRepositoryInterface $categories, TagRepositoryInterface $tags, TrickRepositoryInterface $tricks)
 {
     parent::__construct();
     $this->categories = $categories;
     $this->tags = $tags;
     $this->tricks = $tricks;
 }
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->modelName = 'Sacramento';
     $this->collectionName = 'sacramentos';
     $this->folder = 'sacramentos';
 }
 public function __construct(Mailer $mailer, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo)
 {
     parent::__construct();
     $this->mailer = $mailer;
     $this->invoiceRepo = $invoiceRepo;
     $this->clientRepo = $clientRepo;
 }
Example #12
0
 public function __construct()
 {
     parent::__construct();
     $this->page_attributes->page_title = 'Perusahaan';
     $this->page_attributes->breadcrumb = [];
     $this->middleware('password.needed', ['only' => ['destroy']]);
 }
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->dishes = User::find(Auth::id())->dishes->lists('name', 'id')->toArray();
     $this->ingredients = User::find(Auth::id())->ingredients->lists('name', 'id')->toArray();
     \View::share('dishes', $this->dishes);
     \View::share('ingredients', $this->ingredients);
 }
Example #14
0
 function __construct()
 {
     parent::__construct();
     Session::set('API_token', Session::get('API_token_public'));
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.info.';
     $this->page_attributes->breadcrumb = [];
 }
 public function __construct(UserAuthentication $userAuth, Dispatcher $dispatcher)
 {
     $this->userAuth = $userAuth;
     $this->middleware('guest', ['only' => ['registerAjax', 'loginAjax']]);
     $this->domain = 'Main Domain';
     $this->ajaxAuth = true;
     parent::__construct($dispatcher);
 }
 /**
  * Create a new controller instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->view_data['view_path_root'] = 'page.quatation';
     $this->view_data['page_title'] = $this->view_data['page_title'] . ' - Quotation';
     $this->view_data['heading'] = 'Ask for a quotation';
     $this->view_data['sub_heading'] = 'Complete the following steps complete the quotation!';
 }
 public function __construct()
 {
     parent::__construct();
     Session::set('API_token', Session::get('API_token_private'));
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.invitation.';
     $this->page_attributes->breadcrumb = ['Who Got My Invitation' => route('my.balin.invitation.index')];
 }
Example #18
0
 public function __construct()
 {
     parent::__construct();
     Session::set('API_token', Session::get('API_token_private'));
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.redeem_code.';
     $this->page_attributes->breadcrumb = ['Redeem Code' => route('my.balin.redeem.index')];
 }
 public function __construct()
 {
     parent::__construct();
     Session::put('API_token', Session::get('API_token_private'));
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.checkout.';
     $this->page_attributes->breadcrumb = ['Checkout' => route('my.balin.checkout.get')];
 }
Example #20
0
 public function anyData($id = null)
 {
     if ($id) {
         $model = SKP::with('targetKerja')->findOrFail($id);
         $id = $model->targetKerja->pluck('id')->toArray();
     }
     return parent::anyData($id);
 }
Example #21
0
 /**
  * Create a new UserController instance.
  *
  * @param \App\Repositories\TrickRepositoryInterface $tricks
  * @param \App\Repositories\UserRepositoryInterface  $users
  */
 public function __construct(TrickRepositoryInterface $tricks, UserRepositoryInterface $users)
 {
     parent::__construct();
     $this->beforeFilter('auth', ['except' => 'getPublic']);
     $this->user = Auth::user();
     $this->tricks = $tricks;
     $this->users = $users;
 }
 /**
  * Create a new controller instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->view_data['view_path_root'] = 'page.classified-ad';
     $this->view_data['page_title'] = $this->view_data['page_title'] . ' - Classified Ad';
     $this->view_data['heading'] = 'Classified Ads';
     $this->view_data['sub_heading'] = 'Select from the following ads and view/post your ad!';
 }
 public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo, ContactMailer $contactMailer)
 {
     parent::__construct();
     $this->paymentRepo = $paymentRepo;
     $this->invoiceRepo = $invoiceRepo;
     $this->accountRepo = $accountRepo;
     $this->contactMailer = $contactMailer;
 }
 public function __construct(AccountRepository $accountRepo, UserMailer $userMailer, ContactMailer $contactMailer, ReferralRepository $referralRepository)
 {
     parent::__construct();
     $this->accountRepo = $accountRepo;
     $this->userMailer = $userMailer;
     $this->contactMailer = $contactMailer;
     $this->referralRepository = $referralRepository;
 }
 public function __construct(Mailer $mailer, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, InvoiceService $invoiceService, RecurringInvoiceService $recurringInvoiceService)
 {
     parent::__construct();
     $this->mailer = $mailer;
     $this->invoiceRepo = $invoiceRepo;
     $this->clientRepo = $clientRepo;
     $this->invoiceService = $invoiceService;
     $this->recurringInvoiceService = $recurringInvoiceService;
 }
Example #26
0
 public function __construct()
 {
     parent::__construct();
     Session::set('API_token', Session::get('API_token_private'));
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.profile.user.';
     $this->page_attributes->breadcrumb = ['Profile' => route('my.balin.profile')];
     $this->take = 5;
 }
Example #27
0
 /**
  * Create a new TrickController instance.
  *
  * @param \App\Repositories\TrickRepositoryInterface    $trick
  * @param \App\Repositories\TagRepositoryInterface      $tags
  * @param \App\Repositories\CategoryRepositoryInterface $categories
  */
 public function __construct(TrickRepositoryInterface $trick, TagRepositoryInterface $tags, CategoryRepositoryInterface $categories)
 {
     parent::__construct();
     $this->middleware('auth');
     $this->middleware('trick.owner', ['only' => ['getEdit', 'postEdit', 'getDelete']]);
     $this->trick = $trick;
     $this->tags = $tags;
     $this->categories = $categories;
 }
Example #28
0
 function __construct()
 {
     parent::__construct();
     if (Session::has('whoami')) {
         Session::put('API_token', Session::get('API_token_private'));
     } else {
         Session::put('API_token', Session::get('API_token_public'));
     }
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.error.';
 }
Example #29
0
 public function __construct()
 {
     parent::__construct();
     if (Session::has('whoami')) {
         Session::put('API_token', Session::get('API_token_private'));
     } else {
         Session::put('API_token', Session::get('API_token_public'));
     }
     $this->page_attributes->title = 'BALIN.ID';
     $this->page_attributes->source = 'web_v2.pages.cart.';
     $this->page_attributes->breadcrumb = ['Cart' => route('balin.cart.index')];
 }
Example #30
0
 public function semua($print = false)
 {
     parent::getIndex();
     view()->share('breadcrumb3', 'Lihat Semua');
     $fields = $this->model->getFields();
     $fields = array_except($fields, ['periode_id', 'penilai_id']);
     view()->share('fields', $fields);
     if ($print) {
         return view('app.penilaian.print');
     }
     view()->share(['printUrl' => url('penilaian/print')]);
     return view('app.penilaian.index');
 }