コード例 #1
0
ファイル: LayoutController.php プロジェクト: coseyo/lumen
 private function _initBlade()
 {
     Blade::setContentTags('<%', '%>');
     Blade::setEscapedContentTags('<%%', '%%>');
 }
コード例 #2
0
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
// $app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
Blade::setContentTags('<%', '%>');
// for variables and all things Blade
Blade::setEscapedContentTags('<%%', '%%>');
// for escaped data
return $app;
コード例 #3
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     // Avoid Blade syntax conflicts with AngularJS.
     Blade::setContentTags('<%', '%>');
     Blade::setEscapedContentTags('<%%', '%%>');
 }
コード例 #4
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Blade::setContentTags('[[', ']]');
     Blade::setEscapedContentTags('{!!', '!!}');
 }
コード例 #5
0
ファイル: BaseController.php プロジェクト: nukacode/core
 /**
  * Resets blade syntax to Laravel 4 style.
  */
 protected function resetBladeSyntax()
 {
     Blade::setEchoFormat('%s');
     Blade::setContentTags('{{', '}}');
     Blade::setEscapedContentTags('{{{', '}}}');
 }
コード例 #6
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Blade::setContentTags("[[", "]]");
     Blade::setEscapedContentTags("[[[", "]]]");
 }
コード例 #7
0
 /**
  *Showing User's Profile, A user can be manager or talent
  */
 public function showUserProfile($id)
 {
     Blade::setContentTags('<%', '%>');
     // for variables and all things Blade
     Blade::setEscapedContentTags('<%%', '%%>');
     // for escaped data
     if ($this->checkIfGuestDoNotHavePermission($id, UserSettings::PRIVACY_TYPE_PROFILE)) {
         return redirect('/');
     }
     $userProfile = UserProfile::find($id);
     $userProfile->getMutatedData = false;
     $country = BasicSiteRepository::getListOfCountries();
     //        $sportPositions=array_map('ucfirst',SportsRepository::getSportPositions(Session::get(SiteSessions::USER_SPORT_TYPE)));
     $userCareerHistory = $userProfile->careerInformation;
     $awards = $userProfile->awards;
     if ($awards == null) {
         $awards = new Awards();
     }
     $endorsements = $userProfile->endorsements()->take(10)->get();
     $visitingUserEndorsed = $userProfile->endorsements()->wherePivot('user_id', '=', $userProfile->user_id)->wherePivot('endorsement_by', '=', Session::get(SiteSessions::USER_ID))->get();
     if (count($visitingUserEndorsed) <= 0) {
         $visitingUserEndorsed = 0;
     } else {
         $visitingUserEndorsed = 1;
     }
     //Setting whether profile is editable or not.
     $profileEditable = false;
     if ($userProfile->user_id == Session::get(SiteSessions::USER_ID)) {
         $profileEditable = true;
     }
     //Setting whether profile is favourited by visiting user or not
     $visitingUserFavourited = DB::table('favourite')->where('user_id', '=', Session::get(SiteSessions::USER_ID))->where('favourited_to', '=', $userProfile->user_id)->get();
     if (count($visitingUserFavourited) > 0) {
         $visitingUserFavourited = 1;
     } else {
         $visitingUserFavourited = 0;
     }
     return view('profile.user_profile', compact('userProfile', 'country', 'userCareerHistory', 'awards', 'endorsements', 'visitingUserEndorsed', 'profileEditable', 'visitingUserFavourited'));
 }