当前位置: 首页>>代码示例>>PHP>>正文


PHP Config::get方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Config::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::get方法的具体用法?PHP Config::get怎么用?PHP Config::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Config的用法示例。


在下文中一共展示了Config::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mergeProvidersWithConfig

 private function mergeProvidersWithConfig($providers)
 {
     $loadedProviders = Config::get('app.providers');
     $difference = array_diff($providers, $loadedProviders);
     $purged = $this->removeUnnecessaryLaravelProviders($difference);
     return $purged;
 }
开发者ID:remoblaser,项目名称:lazy-artisan,代码行数:7,代码来源:GenerateProvidersCommand.php

示例2: index

 /**
  * List of users
  *
  * @return View
  */
 public function index()
 {
     $dynamicItems = $this->userRepo->getAllPaginated(50, true);
     $operationColumn = 'admin.pages.user.partials._operation';
     $columns = Config::get('dynamic_data/datatables.users');
     return $this->view($this->getView('admin.pages.user.index', 'admin.pages.common.index'), compact('dynamicItems', 'operationColumn', 'columns'));
 }
开发者ID:Ajaxman,项目名称:SaleBoss,代码行数:12,代码来源:UserController.php

示例3:

 function __construct()
 {
     $this->default = Config::get("nlp.default");
     $this->api_key = Config::get("nlp.connections.{$this->default}.API_KEY");
     $this->result_type = \Config::get("nlp.result");
     $this->cache_type = \Config::get("nlp.cache");
 }
开发者ID:mozzos,项目名称:nlptool,代码行数:7,代码来源:NLPAbstract.php

示例4: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $user = Auth::user();
     $pusher = new Pusher(Config::get('services.pusher.key'), Config::get('services.pusher.secret'), Config::get('services.pusher.id'));
     $pusher->trigger('my-channel', 'my-event', array('message' => $user->name . ': ' . Input::get('msg'), 'user_id' => $user->id));
     return 'done';
 }
开发者ID:andy-pei,项目名称:chatApp,代码行数:13,代码来源:ChatController.php

示例5: __construct

 public function __construct()
 {
     // setup PayPal api context
     $paypal_conf = Config::get('paypal');
     $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));
     $this->_api_context->setConfig($paypal_conf['settings']);
 }
开发者ID:alfoalfr,项目名称:laravel-dev-env,代码行数:7,代码来源:PaymentPaypal.php

示例6: getResize

 /**
  * Dipsplay image for resizing
  *
  * @return mixed
  */
 public function getResize()
 {
     $ratio = 1.0;
     $image = Input::get('img');
     $dir = Input::get('dir');
     $original_width = Image::make(base_path() . "/" . Config::get('lfm.images_dir') . $dir . "/" . $image)->width();
     $original_height = Image::make(base_path() . "/" . Config::get('lfm.images_dir') . $dir . "/" . $image)->height();
     $scaled = false;
     if ($original_width > 600) {
         $ratio = 600 / $original_width;
         $width = $original_width * $ratio;
         $height = $original_height * $ratio;
         $scaled = true;
     } else {
         $height = $original_height;
         $width = $original_width;
     }
     if ($height > 400) {
         $ratio = 400 / $original_height;
         $width = $original_width * $ratio;
         $height = $original_height * $ratio;
         $scaled = true;
     }
     return View::make('laravel-filemanager::resize')->with('img', Config::get('lfm.images_url') . $dir . "/" . $image)->with('dir', $dir)->with('image', $image)->with('height', number_format($height, 0))->with('width', $width)->with('original_height', $original_height)->with('original_width', $original_width)->with('scaled', $scaled)->with('ratio', $ratio);
 }
开发者ID:Rhincodon,项目名称:laravel-filemanager,代码行数:30,代码来源:ResizeController.php

示例7: __construct

 public function __construct(array $form)
 {
     parent::__construct($form);
     $this->setModel('Clumsy\\FormBuilder\\Models\\ClumsyFormStructure');
     $this->setResource(Config::get('clumsy/form-builder::resource'));
     $this->initializeForms();
 }
开发者ID:Flipjms,项目名称:form-builder,代码行数:7,代码来源:DatabaseSection.php

示例8: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('mmanos/laravel-casset');
     if ($route = Config::get('laravel-casset::route')) {
         Route::get(trim($route, '/') . '/{type}', 'Mmanos\\Casset\\CassetController@getIndex');
     }
 }
开发者ID:mmanos,项目名称:laravel-casset,代码行数:12,代码来源:CassetServiceProvider.php

示例9: fire

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $days_to_wait = Config::get('store.days_to_remind');
     //\DB::enableQueryLog();
     $this->info("Checks If there are orders to be rated ({$days_to_wait} Days Old)");
     //Checks all closed orders that has not been rated nor mail has been sent and where updated 5 days ago
     //and the mails has not been sent yet
     $orders = Order::where('rate', null)->where('status', 'closed')->where('rate_mail_sent', false)->where('updated_at', '<', Carbon::now()->subDays($days_to_wait))->get();
     //$this->info(print_r(\DB::getQueryLog()));
     $this->info("Orders That need mail: " . $orders->count());
     foreach ($orders as $order) {
         $this->info("Order: " . $order->id . ' Needs to be rated, and mail has not been sent');
         $buyer = User::find($order->user_id);
         if ($buyer) {
             $email = $buyer->email;
             $mail_subject = trans('email.cron_emails.remind_rate_order_subject');
             $data = ['email_message' => $mail_subject, 'email' => $email, 'subject' => $mail_subject, 'order_id' => $order->id];
             Mail::queue('emails.cron.rate_order', $data, function ($message) use($data) {
                 $message->to($data['email'])->subject($data['subject']);
             });
             $order->rate_mail_sent = true;
             $order->save();
         }
     }
 }
开发者ID:masterpowers,项目名称:antVel,代码行数:30,代码来源:SendRateMails.php

示例10: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app['router']->before(function ($request) {
         // First clear out all "old" visitors
         Visitor::clear();
         $page = Request::path();
         $ignore = Config::get('visitor-log::ignore');
         if (is_array($ignore) && in_array($page, $ignore)) {
             //We ignore this site
             return;
         }
         $visitor = Visitor::getCurrent();
         if (!$visitor) {
             //We need to add a new user
             $visitor = new Visitor();
             $visitor->ip = Request::getClientIp();
             $visitor->useragent = Request::server('HTTP_USER_AGENT');
             $visitor->sid = str_random(25);
         }
         $user = null;
         $usermodel = strtolower(Config::get('visitor-log::usermodel'));
         if (($usermodel == "auth" || $usermodel == "laravel") && Auth::check()) {
             $user = Auth::user()->id;
         }
         if ($usermodel == "sentry" && class_exists('Cartalyst\\Sentry\\SentryServiceProvider') && Sentry::check()) {
             $user = Sentry::getUser()->id;
         }
         //Save/Update the rest
         $visitor->user = $user;
         $visitor->page = $page;
         $visitor->save();
     });
 }
开发者ID:uniacid,项目名称:visitor-log,代码行数:38,代码来源:VisitorLogServiceProvider.php

示例11: __construct

 /**
  * Route53 constructor.
  *
  * @param null $access_key
  * @param null $secret_key
  */
 public function __construct($access_key = null, $secret_key = null)
 {
     $this->access_key = Config::get('aws_sdk.access_key', $access_key);
     $this->secret_key = Config::get('aws_sdk.secret_key', $secret_key);
     $this->host = Config::get('aws_sdk.route53_host', 'route53.amazonaws.com');
     $this->api_version = self::API_VERSION;
 }
开发者ID:lu1ssuarez,项目名称:aws-sdk-wrapper,代码行数:13,代码来源:Route53.php

示例12: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (Config::get("customer_portal.ticketing_enabled") !== true) {
         return redirect()->back()->withErrors(trans("errors.sectionDisabled"));
     }
     return $next($request);
 }
开发者ID:sonarsoftware,项目名称:customer_portal,代码行数:14,代码来源:TicketMiddleware.php

示例13: setupLayout

 /**
  * Setup the layout used by the controller.
  *
  * @return void
  */
 protected function setupLayout()
 {
     $this->layout = View::make(Config::get('syntara::views.master'));
     $this->layout->title = 'VietSol CMS';
     $this->layout->breadcrumb = array();
     View::share('siteName', 'VietSol CMS');
 }
开发者ID:parabol,项目名称:laravel-cms,代码行数:12,代码来源:RootController.php

示例14: about

 public function about()
 {
     if (Auth::isSubscriber()) {
         return redirect('/missioncontrol');
     }
     return view('missionControl.about', ['stripePublicKey' => Config::get('services.stripe.public')]);
 }
开发者ID:RoryStolzenberg,项目名称:spacexstats,代码行数:7,代码来源:MissionControlController.php

示例15: __construct

 public function __construct($appId)
 {
     $this->appId = $appId;
     $this->input = new Input();
     $this->http = new ComponentHttp(new ComponentAccessToken());
     $this->component_appid = Config::get('wechat.componentAppId');
 }
开发者ID:sdgdsffdsfff,项目名称:wechat-component,代码行数:7,代码来源:Auth.php


注:本文中的Illuminate\Support\Facades\Config::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。