How I call a library defined globally in a particuler page , not in every page : Laravel -


excuse me, defined library in app/start/global.php

classloader::adddirectories(array(      app_path().'/commands',     app_path().'/controllers',     app_path().'/models',     app_path().'/database/seeds',     app_path().'/trunk/index.php', <----- custom library   )); 

i want load or call library in particular page. working every page. need ..

yes !! found solution in little bit different approach.

i add in routes.php instead of global.php

route::get('/calender', function() {     $c = require app_path().'/trunk/index.php';      return view::make('calender')->with('c', $c); }); 

and add in calender.blade.php

<h1><?php echo "{$c}"; ?></h1> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -