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


PHP App::isLocal方法代码示例

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


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

示例1: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     if (\App::isLocal()) {
         $this->registerServiceProviders();
         $this->registerFacadeAliases();
     }
 }
开发者ID:andrewboy,项目名称:LocalEnviroment,代码行数:12,代码来源:LocalEnvironmentServiceProvider.php

示例2: render

 /**
  * 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)
 {
     if ($e instanceof ModelNotFoundException) {
         $e = new NotFoundHttpException($e->getMessage(), $e);
     } elseif ($e instanceof HttpException && \App::isLocal() === false) {
         Response::json(['result' => false, 'message' => $e->getMessage()])->setStatusCode($e->getStatusCode())->send();
         exit;
     }
     return parent::render($request, $e);
 }
开发者ID:realshadow,项目名称:satis-control-panel,代码行数:17,代码来源:Handler.php

示例3: __construct

 public function __construct(Advisors $account, array $items = [])
 {
     foreach ($items as $key => $properties) {
         if (!isset($this->lookup[$key])) {
             if (\App::isLocal()) {
                 throw new \Exception('Unknown identifier - ' . $key);
             }
             continue;
         }
         $class = "Destiny\\AdvisorsTwo\\Activity\\" . $this->lookup[$key];
         /** @var Activity $activity */
         $activity = new $class($account, $properties);
         $items[$activity->identifier] = $activity;
     }
     parent::__construct($items);
 }
开发者ID:TrackerNetwork,项目名称:DestinyStatus,代码行数:16,代码来源:AdvisorActivityCollection.php

示例4: webpack

 /**
  * Get the path to a versioned Webpack file.
  *
  * @param  string $extension Asset extension
  * @param  string $bundle Default bundle
  * @return string
  *
  * @throws \InvalidArgumentException
  */
 function webpack($extension, $bundle = 'app')
 {
     static $manifest = null;
     if (is_null($manifest)) {
         $content = @file_get_contents(public_path(config('webpack.build_path', 'build') . '/manifest.json'));
         $manifest = @json_decode($content, true);
     }
     if (isset($manifest[$bundle][$extension])) {
         if (App::isLocal() && !File::exists(public_path($manifest[$bundle][$extension]))) {
             $secure = config('webpack.dev_server.https', false);
             $server = config('webpack.dev_server.ip', '127.0.0.1');
             $port = config('webpack.dev_server.port', 8080);
             $url = 'http' . ($secure ? 's://' : '://') . $server . ':' . $port;
             return $url . $manifest[$bundle][$extension];
         }
         return $manifest[$bundle][$extension];
     }
     throw new InvalidArgumentException("File {$bundle}.{$extension} not defined in asset manifest.");
 }
开发者ID:slydeath,项目名称:laravel5-webpack,代码行数:28,代码来源:helpers.php

示例5: upload

 public function upload()
 {
     $s3 = \Aws\S3\S3Client::factory(array('key' => 'AKIAIUCV4E2L4HDCDOUA', 'secret' => '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', 'region' => 'us-east-1'));
     $key = new Key();
     if (Input::file('key') != null) {
         exec('openssl rsa -noout -in ' . Input::file('key')->getRealPath(), $cli_output, $cli_exec_result_success);
         // lmao why is this logic reversed? and it works?
         if (!$cli_exec_result_success) {
             $s3->putObject(array('Bucket' => App::isLocal() ? 'devkeys.nosprawl.software' : 'keys.nosprawl.software', 'Key' => Input::file('key')->getClientOriginalName(), 'SourceFile' => Input::file('key')->getRealPath()));
             $key->remote_url = Input::file('key')->getClientOriginalName();
         } else {
             return Redirect::to('integrations')->withMessage("Key not added. Please upload a valid PEM file.");
         }
     }
     $key->integration_id = Input::get('integration_id');
     $key->username = Input::get('username');
     $key->password = Input::get('password');
     if ($key->save()) {
         return Redirect::to('integrations')->withMessage("Credentials added.");
     } else {
         return Redirect::to('integrations')->withMessage("Key not added.");
     }
 }
开发者ID:crudbug,项目名称:Dashboard,代码行数:23,代码来源:KeysController.php

示例6: getCache

 public static function getCache($cache)
 {
     if (App::isLocal()) {
         Cache::forget('DB_Nav');
         Cache::forget('DB_Urls');
         Cache::forget('DB_Option');
         Cache::forget('DB_AdminBlockTypes');
         Cache::forget('DB_AdminResourceName');
         Cache::forget('DB_AdminResource');
         Cache::forget('DB_LocaleFrontEnable');
         Cache::forget('DB_ResourceNavigable');
         Cache::forget('DB_LocalesEnabled');
     }
     if (!Cache::has($cache)) {
         $cachr = new Cachr();
         $cachr->initCache();
     }
     if (Cache::get($cache) === null) {
         $cachr = new Cachr();
         $cachr->initCache();
     }
     return Cache::get($cache);
 }
开发者ID:Metrakit,项目名称:dynamix,代码行数:23,代码来源:Cachr.php

示例7: add

 public static function add($input, $cc_admin = false)
 {
     // set subject
     $input['subject'] = '[BagiKasih] ' . $input['subject'];
     // set sender
     $input['sender_email'] = 'info@bagikasih.com';
     $input['sender_name'] = 'BagiKasih';
     // set status
     $input['status'] = 0;
     $newsletter = new Newsletter();
     foreach ($input as $coulumn => $value) {
         $newsletter->{$coulumn} = $value;
     }
     $newsletter->save();
     try {
         $data = array('content' => $newsletter->message);
         if (!App::isLocal()) {
             // send email
             Mail::send('emails.blank', $data, function ($message) use($newsletter) {
                 $message->from($newsletter->sender_email, $newsletter->sender_name);
                 $message->to($newsletter->recipient_email, $newsletter->recipient_name);
                 if ($cc_admin) {
                     $message->cc('support@bagikasih.com');
                 }
                 $message->subject($newsletter->subject);
             });
         } else {
             // echo View::make('emails.blank', $data);
         }
         $newsletter->status = 1;
         $newsletter->save();
     } catch (Exception $e) {
         $newsletter->status = 2;
         $newsletter->save();
     }
     return $newsletter;
 }
开发者ID:whiterun,项目名称:bagikasih-v2,代码行数:37,代码来源:Newsletter.php

示例8: showView

 /**
  * Show chat home view
  * 
  * @return View
  */
 public function showView()
 {
     $users = array();
     $user = UserController::getUser(Auth::user());
     if ($user instanceof Teacher) {
         $sectionCodes = SectionCode::where('teacher_id', new MongoId($user->_id))->where('status', true)->get();
         foreach ($sectionCodes as $sectionCode) {
             foreach ($sectionCode->teamleaders_id as $id) {
                 array_push($users, Student::find($id));
             }
             $users = array_unique($users);
         }
     } else {
         if ($user instanceof Student) {
             $sectionCodes = SectionCode::whereIn('students_id', array(new MongoId($user->_id)))->where('status', true)->get();
             foreach ($sectionCodes as $sectionCode) {
                 foreach ($sectionCode->students_id as $id) {
                     if ($id != Auth::id()) {
                         array_push($users, Student::find($id));
                     }
                 }
                 $count = SectionCode::whereIn('teamleaders_id', array(Auth::id()))->where('_id', new MongoId($sectionCode->_id))->count();
                 if ($count > 0) {
                     array_push($users, Teacher::find($sectionCode->teacher_id));
                 }
                 $users = array_unique($users);
             }
         } else {
             if ($user instanceof University) {
                 return View::make('error.403');
             }
         }
     }
     $ip = App::isLocal() ? '127.0.0.1' : '104.131.3.39';
     return View::make('chat.home')->with(array('contacts' => $users, 'user' => $user, 'ip' => $ip));
 }
开发者ID:ronnysuero,项目名称:devsfarm,代码行数:41,代码来源:ChatController.php

示例9: function

| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::model('country', 'Country');
Route::model('city', 'City');
Route::model('user', 'User');
Route::model('social_target_category', 'SocialTargetCategory');
Route::model('social_action_category', 'SocialActionCategory');
Route::model('event_category', 'EventCategory');
Route::model('donation', 'Donation');
Route::model('newsletter', 'Newsletter');
Route::model('photo', 'Photo');
// Implements
// Admin Panel
if (App::isLocal()) {
    $admin_domain = 'admin.bagikasih.dev';
} else {
    $admin_domain = 'admin.bagikasih.com';
}
Route::group(array('domain' => $admin_domain), function () {
    // login
    Route::get('/signin', array('as' => 'signin', 'uses' => 'AdminBaseController@admin'));
    Route::post('/signin', array('as' => 'signin.post', 'uses' => 'AdminBaseController@admin'));
    Route::group(array('before' => 'admin'), function () {
        Route::get('/signout', array('as' => 'signout', 'uses' => 'AdminBaseController@signout'));
        Route::get('/setting', array('as' => 'admin.setting', 'uses' => 'AdminBaseController@setting'));
        Route::post('/setting', array('as' => 'admin.setting.post', 'uses' => 'AdminBaseController@setting'));
        Route::get('/', array('as' => 'admin.dashboard', 'uses' => 'AdminDashboardController@index'));
        // SOCIAL TARGET
        Route::get('/social-target', array('as' => 'admin.social-target', 'uses' => 'AdminSocialTargetController@index'));
开发者ID:whiterun,项目名称:bagikasih-v2,代码行数:31,代码来源:routes.php

示例10: postComplete

 public function postComplete()
 {
     $this->loadQuestions();
     $this->howfit = Session::get('result');
     $this->baseline = Session::get('baseline');
     $validate_data = Input::except('_token');
     $rules = array('fname' => 'required', 'sname' => 'required', 'email' => 'required', 'company' => 'required', 'country' => 'required', 'terms' => 'required');
     $validator = Validator::make($validate_data, $rules);
     if ($validator->passes()) {
         Session::put('user', $validate_data);
         $screener1 = $this->quiz['demographics']['pages']['page1']['questions']['s1']['selected'];
         $screener2 = $this->quiz['demographics']['pages']['page2']['questions']['s2']['selected'];
         $screener3 = $this->quiz['demographics']['pages']['page3']['questions']['s3']['selected'];
         //update source
         $currentLocal = App::getLocale();
         $localQuestions = $currentLocal == 'en' ? '' : $currentLocal;
         $source = array('C_emailAddress' => $validate_data['email'], 'C_FirstName' => $validate_data['fname'], 'C_LastName' => $validate_data['sname'], 'C_Company' => $validate_data['company'], 'C_Country' => $validate_data['country'], 'C_BusPhone' => $validate_data['phone'], 'C_Job_Responsibilities_1' => $screener1 == Config::get($localQuestions . 'questions.screeners.pages.page1.questions.s1.options.0.label') ? "IT" : "Business / Operations", 'C_NumberofEmployees_Range_1' => $screener2, 'form_source' => Input::get('form_source'));
         Session::put('source', $source);
         //save in db
         $user = new User();
         $user->fname = $validate_data['fname'];
         $user->lname = $validate_data['sname'];
         $user->email = $validate_data['email'];
         $user->company = $validate_data['company'];
         $user->country = $validate_data['country'];
         $user->tel = $validate_data['phone'];
         $user->referer = $validate_data['referer'];
         $user->quiz = json_encode($this->quiz);
         $user->result = json_encode($this->howfit);
         $user->save();
         $this->userid = $user->id;
         $validate_data['userid'] = $user->id;
         //generate report
         $this->generateReport();
         $curloc = App::getLocale();
         /*if(!App::isLocal()){
         			//send guzzle request
         			$client = new GuzzleHttp\Client();
         			$url = 'https://s2048.t.eloqua.com/e/f2.aspx';
         			//$url = 'http://www.google.com';
         			try {
         				$request = $client->createRequest('GET', $url);
         				$query = $request->getQuery();
         				$query['elqFormName'] = Lang::get('general.extFormName');
         				$query['elqSiteID'] = '2048';
         				foreach($source as $key=>$item){
         					$query[$key] = $item;
         				}
         								
         				$response = $client->send($request);
         			} catch (GuzzleHttp\Exception\RequestException $e) {
         				
         				Mail::queue('emails.errors', array('process'=>'Guzzle', 'message'=>$e->getMessage(), 'time'=>date('l jS \of F Y h:i:s A')), function($message)
         				{
         					$message->to('roarkmccolgan@gmail.com', 'Roark McColgan')->subject('Error on Converged Infrastructure - Maturity Benchmark! ('.$curloc.')');
         				});
         			}
         		}*/
         $subject = Lang::get('email.report');
         //send mail to user
         Mail::queue('emails.' . $curloc . 'download', array('fname' => $validate_data['fname'], 'sname' => $validate_data['sname'], 'userid' => $validate_data['userid']), function ($message) use($validate_data, $subject, $curloc) {
             $message->to($validate_data['email'], $validate_data['fname'] . ' ' . $validate_data['sname'])->subject($subject);
         });
         //send mail to notification people
         if (App::isLocal()) {
             $emails = ['roarkmccolgan@gmail.com'];
         } else {
             $emails = ['roarkmccolgan@gmail.com', 'Pelle_Lindell@Dell.com'];
         }
         Mail::queue('emails.notification', array('fname' => $validate_data['fname'], 'sname' => $validate_data['sname'], 'email' => $validate_data['email'], 'company' => $validate_data['company'], 'phone' => $validate_data['phone'], 'screener1' => $this->quiz['demographics']['pages']['page1']['questions']['s1']['selected'], 'screener2' => $this->quiz['demographics']['pages']['page2']['questions']['s2']['selected'], 'screener3' => $this->quiz['demographics']['pages']['page3']['questions']['s3']['selected'], 'score' => $this->howfit['overall']['score'], 'rating' => $this->howfit['overall']['rating'], 'userid' => $validate_data['userid']), function ($message) use($validate_data, $emails, $curloc) {
             $message->to($emails)->subject('Conferged Infrastructure Quiz completed (' . $curloc . ')');
         });
         $vars = array('heading' => Lang::get('general.title'), 'sub1' => Lang::get('general.hi') . ', ' . $validate_data['fname'], 'sub2' => Lang::get('general.soon'), 'tweet' => $this->baseline['overall']['types'][$this->howfit['overall']['rating']]['tweet'], 'colour' => 'orange', 'script' => ['
                     _gaq.push([\'_trackEvent\', \'Form Submit\', \'Registration\']);
                     '], 'quiz' => $this->quiz);
         /*if(Cookie::has('quiz_progress')){
         			$progress_id = Cookie::get('quiz_progress');
         			$progress = Progress::find($progress_id);
         			if($progress) $progress->delete();
         		}
         		$cookie = Cookie::forget('quiz_progress');*/
         //return View::make('thankyou',$vars)->withCookie($cookie);
         return View::make('thankyou', $vars);
     }
     Input::flashExcept('_token');
     return Redirect::to(getLang() . 'quiz/complete')->withErrors($validator);
 }
开发者ID:roarkmccolgan,项目名称:dellconvergedmaturity,代码行数:87,代码来源:AssesmentController.php

示例11: switch

| exceptions. If nothing is returned, the default error view is
| shown, which includes a detailed stack trace during debug.
|
*/
App::error(function (Exception $exception, $code) {
    // Throw 404 error on ModelNotFoundException
    if ($exception instanceof Illuminate\Database\Eloquent\ModelNotFoundException) {
        $code = 404;
    }
    switch ($code) {
        case 403:
            return Response::view('errors.403', ['title' => 'Erreur 403 – ' . Config::get('typicms.' . App::getLocale() . '.websiteTitle'), 'lang' => App::getLocale(), 'bodyClass' => 'error-403'], $code);
        case 404:
            return Response::view('errors.404', ['title' => 'Erreur 404 – ' . Config::get('typicms.' . App::getLocale() . '.websiteTitle'), 'lang' => App::getLocale(), 'bodyClass' => 'error-404'], $code);
    }
    if (!App::isLocal()) {
        return Response::view('errors.500', ['title' => 'Erreur 500 – ' . Config::get('typicms.' . App::getLocale() . '.websiteTitle'), 'lang' => App::getLocale(), 'bodyClass' => 'error-500'], 500);
    }
});
/*
|--------------------------------------------------------------------------
| Maintenance Mode Handler
|--------------------------------------------------------------------------
|
| The "down" Artisan command gives you the ability to put an application
| into maintenance mode. Here, you will define what is displayed back
| to the user if maintenace mode is in effect for this application.
|
*/
App::down(function () {
    return Response::make("Be right back!", 503);
开发者ID:Ayoubblog,项目名称:TypiCMS,代码行数:31,代码来源:global.php

示例12:

	<head>
		<meta charset="utf-8">
	</head>
	<body style="margin: 0; padding: 0; background: #eee;">
		<table cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<td style="background: #343434; padding-top: 4px; padding-bottom: 4px;" width="10%"></td>
				<td style="background: #343434; padding-top: 4px; padding-bottom: 4px;">
					<a href="http://nosprawl.com"><img style="display: block; float: left;" height="43" src="http://s3.amazonaws.com/us-east-1-resources-nosprawl/email_logo.png"></a>
					<div style="color: #fff; font-family: Helvetica, Arial; float: left; font-size: 1.4em; padding-top: 13px; padding-left: 13px; position: relative;">Welcome</div>
				</td>
				<td style="background: #343434; padding-top: 4px; padding-bottom: 4px;" width="10%"></td>
			</tr>
		</table>
		<table cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<td style="background: #eee; padding-top: 4px; padding-bottom: 4px;" width="10%"></td>
				<td style="background: #eee; padding-top: 4px; padding-bottom: 4px;">
					<div style="color: #fff; font-family: Helvetica, Arial; font-size: 1em; padding-top: 20px; padding-bottom: 20px; line-height: 1.7em; position: relative; color: #343434;">Hi {{ $data['name'] }},<br />You&rsquo;ve been added as a subuser on {{ User::find($data['parent_user_id'])->company_name }}&rsquo;s NoSprawl account.</div>
					
					<div style="display: block; font-family: Helvetica, Arial; font-size: 1em; color: #343434; line-height: 1.7em; margin-top: 0; padding-top: 0;">Please <a href="<?php 
echo App::isLocal() ? 'http://localhost:8000/signup/' : 'http://my.nosprawl.com/signup/';
echo $data['user_confirmation_token'];
?>
">activate your account now</a>.</div>
					<div style="display: block; font-family: Helvetica, Arial; font-size: 1em; color: #343434; line-height: 1.7em; margin-top: 0; padding-top: 0;"><br />Thank you,<br />The NoSprawl Team</div>
				</td>
				<td style="background: #eee; padding-top: 4px; padding-bottom: 4px;" width="10%"></td>
			</tr>
		</table></body>
</html>
开发者ID:crudbug,项目名称:Dashboard,代码行数:31,代码来源:invitesubuser.blade.php

示例13: js_assets

 protected function js_assets($type, $mobile = false)
 {
     $current_version = File::get(__DIR__ . "/../../.version");
     if ($mobile == false) {
         $basejsfiles = array('/js/jquery.maskedinput.min.js', '/js/jquery.jgrowl.js', '/js/jquery.selectboxes.js', '/js/jquery-migrate-1.2.1.js', '/js/jquery.ajaxQueue.js', '/js/i18n/grid.locale-en.js', '/js/jquery.jqGrid.min.js', '/js/jquery.timepicker.min.js', '/js/fullcalendar.js', '/js/jquery-idleTimeout.js', '/js/jquery.iframer.js', '/js/jquery.serializeObject.js', '/js/jquery.signaturepad.min.js', '/js/json2.min.js', '/js/highcharts.js', '/js/exporting.js', '/js/jquery.dform-1.1.0.js', '/js/grid.addons.js', '/js/grid.postext.js', '/js/grid.setcolumns.js', '/js/jquery.contextmenu.js', '/js/jquery.searchFilter.js', '/js/jquery.tablednd.js', '/js/jquery.chosen.min.js', '/js/ui.multiselect.js', '/js/jquery.themeswitcher.js', '/js/jquery.color.js', '/js/jquery.Jcrop.min.js', '/js/jquery.realperson.js', '/js/tagit-themeroller.js', '/js/jquery.jstree.js', '/js/jquery.populate.js', '/js/jquery.ocupload.js', '/js/jstz-1.0.4.min.js', '/js/jquery.cookie.js', '/js/bluebutton.js', '/js/wColorPicker.min.js', '/js/wPaint.min.js', '/js/plugins/main/wPaint.menu.main.min.js', '/js/plugins/text/wPaint.menu.text.min.js', '/js/plugins/shapes/wPaint.menu.main.shapes.min.js', '/js/plugins/file/wPaint.menu.main.file.min.js', '/js/jqueryui-editable.min.js', '/js/jquery.touchswipe.min.js', '/js/jquery.ui.touch-punch.min.js', '/js/jquery-textrange.js', '/js/jquery.autosize.min.js', '/js/timecube.jquery.js', '/js/toastr.min.js', '/js/main.js');
     } else {
         $basejsfiles = array('/js/jquery.maskedinput.min.js', '/js/jquery-idleTimeout.js', '/js/jstz-1.0.4.min.js', '/js/jquery.cookie.js', '/js/bluebutton.js', '/js/jquery-textrange.js', '/js/toastr.min.js', '/js/nativedroid.js', '/js/jquery.timepicker.min.js', '/js/jquery.selectboxes.js', '/js/mobile.js');
     }
     if (Session::get('group_id') == '1') {
         $homejsfiles = array('/js/searchbar.js', '/js/dashboard.js', '/js/setup.js', '/js/users.js', '/js/extensions.js', '/js/schedule_admin.js', '/js/update.js', '/js/logs.js', '/js/schedule.js');
     }
     if (Session::get('group_id') == '2' || Session::get('group_id') == '3' || Session::get('group_id') == '4') {
         $homejsfiles = array('/js/searchbar.js', '/js/dashboard.js', '/js/demographics.js', '/js/options.js', '/js/messaging.js', '/js/schedule.js', '/js/billing.js', '/js/financial.js', '/js/office.js');
         if (Session::get('patient_centric') == 'yp' && Session::get('group_id') == '2') {
             $homejsfiles[] = '/js/setup.js';
         }
     }
     if (Session::get('group_id') == '100') {
         $homejsfiles = array('/js/dashboard.js', '/js/demographics.js', '/js/messaging.js', '/js/schedule.js', '/js/issues.js', '/js/encounters.js', '/js/t_messages.js', '/js/medications.js', '/js/supplements.js', '/js/allergies.js', '/js/immunizations.js', '/js/documents.js', '/js/forms.js', '/js/graph.js');
     }
     $chartjsfiles = array('/js/chart.js', '/js/demographics.js', '/js/searchbar.js', '/js/options.js', '/js/menu.js', '/js/issues.js', '/js/encounters.js', '/js/medications.js', '/js/supplements.js', '/js/allergies.js', '/js/alerts.js', '/js/immunizations.js', '/js/print.js', '/js/billing.js', '/js/documents.js', '/js/t_messages.js', '/js/lab.js', '/js/rad.js', '/js/cp.js', '/js/ref.js', '/js/messaging.js', '/js/schedule.js', '/js/financial.js', '/js/office.js', '/js/graph.js', '/js/image.js');
     $response = '';
     if (App::isLocal()) {
         foreach ($basejsfiles as $basejsfile) {
             $response .= HTML::script($basejsfile);
         }
         if ($type == 'home') {
             foreach ($homejsfiles as $homejsfile) {
                 $response .= HTML::script($homejsfile);
             }
         }
         if ($type == 'chart') {
             foreach ($chartjsfiles as $chartjsfile) {
                 $response .= HTML::script($chartjsfile);
             }
         }
     } else {
         $jsfilename = '/temp/' . $current_version . '_' . $type . '_' . time() . '.js';
         $jsfile = __DIR__ . '/../../public' . $jsfilename;
         $str = '';
         foreach ($basejsfiles as $basejsfile) {
             $basejsfile1 = __DIR__ . '/../../public/' . $basejsfile;
             $str .= File::get($basejsfile1);
         }
         if ($type == 'home') {
             foreach ($homejsfiles as $homejsfile) {
                 $homejsfile1 = __DIR__ . '/../../public/' . $homejsfile;
                 $str .= File::get($homejsfile1);
             }
         }
         if ($type == 'chart') {
             foreach ($chartjsfiles as $chartjsfile) {
                 $chartjsfile1 = __DIR__ . '/../../public/' . $chartjsfile;
                 $str .= File::get($chartjsfile1);
             }
         }
         File::put($jsfile, $str);
         $response .= HTML::script($jsfilename);
     }
     return $response;
 }
开发者ID:kylenave,项目名称:nosh-core,代码行数:61,代码来源:BaseController.php

示例14: tweetMail

 private function tweetMail($id, $obj, $action = null)
 {
     if ($mp3->price == 'paid') {
         // Send an email to the new user letting them know their music has been uploaded
         $data = ['mp3' => $mp3, 'subject' => 'Felisitasyon!!! Ou fèk mete yon nouvo mizik pou vann.'];
         TKPM::sendMail('emails.user.buy', $data, 'mp3');
     } elseif (Auth::guest() && Input::has('email')) {
         $mp3->userEmail = Input::get('email');
         $data = ['mp3' => $mp3, 'subject' => 'Felisitasyon!!! Ou fèk mete yon nouvo mizik'];
         TKPM::sendMail('emails.user.guest3', $data, 'guest3');
     }
     // Send an email to the new user letting them know their music has been uploaded
     $data = ['mp3' => $mp3, 'subject' => 'Felisitasyon!!! Ou fèk mete yon nouvo mizik'];
     TKPM::sendMail('emails.user.mp3', $data, 'mp3');
     if (!App::isLocal()) {
         TKPM::tweet($mp3, 'mp3');
     }
 }
开发者ID:jgbneatdesign,项目名称:tikwenpam,代码行数:18,代码来源:AJAXController.php

示例15: asset

 public static function asset($asset, $size = 'null')
 {
     $imgSize = ['thumbs' => 'uploads/images/thumbs/', 'images' => 'uploads/images/', 'show' => 'uploads/images/show/', 'tiny' => 'uploads/images/thumbs/tiny/', 'profile' => 'uploads/images/thumbs/profile/', 'null' => ''];
     $relativeUrl = $imgSize[$size] . $asset;
     if (App::isLocal()) {
         return asset($relativeUrl);
     }
     $cdnUrl = 'http://tkpm.cdn.tikwenpam.net/';
     return url($cdnUrl . $relativeUrl);
 }
开发者ID:jgbneatdesign,项目名称:tikwenpam,代码行数:10,代码来源:TKPM.php


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