nginx - Laravel Blade compiled view not updating. Getting wrong output in browser -
ok, have new homestead setup (0.1.9). had numerous problems setting shared folder (because virtualbox folder share slow). current setup this: homestead (0.1.9) nfs share (using winnfs github).
the problem occurred when view got cached (compiled) , didn't want update. every new add-on file show up, if deleted, view broken. disabled nginx sendfile (thus eliminating weird cache issues when using nfs), opcache disabled in php.ini file (so no caching there), homestead scheme time hosts machine time (to avoid confusion when timestamp of file parsed, if parsed). if go app/storage/views can see views compiled, free of errors if compiled first time.
so let's start file: http://laravel.io/bin/xmoqd. load in browser , compiled version gets added app/storage/view. add together lispum*15 , refresh again. 1 time again compiled version updates , ok.
the problem when remove previous modification , refresh page in app/storage/view: http://laravel.io/bin/kx7ed. have disabled nginx sendfile, opcache in php.ini, i'm using nfs (winnfs) share folder homestead. did php aristan cache:clear, did cache::flush() in php artisan tinker, deleted app/storage/views, did composer install again. have clue what's wrong. thanks
edit: have tested more, , confirmed error triggered using nfs. happens laravel serves views during compilation process , unusual output. when reverted using slow virtualbox folder share, working should, problem page load time really slow.
from time time have problem, and, although not laravel problem, operating scheme one, hacked laravel view service not cache views anymore:
create blade compiler overriding isexpired method:
class bladecompiler extends illuminatebladecompiler { public function isexpired($path) { if (config::get('cache.views') === false) { homecoming true; } homecoming parent::isexpired($path); } }
create service provider override compiler implementation:
class provider extends serviceprovider { /** * indicates if loading of provider deferred. * * @var bool */ protected $defer = false; /** * register service provider. * * @return void */ public function register() { $app = $this->app; $app->bindshared('blade.compiler', function($app) { $cache = $app['path.storage'].'/views'; homecoming new \my\bladecompiler($app['files'], $cache); }); } }
laravel nginx laravel-4 virtualbox blade
No comments:
Post a Comment