blank page
Opened this issue · 3 comments
When try to return a view with the following code:
return \DbView::make($template)->with(['client' => $client])->render();
$template->content contains
@extends('Clients.Documents.templatemaster')
@section('template')
Hello {{ $client->contacts[0]->firstname }}<br><br>I hear your address is {{ $client->address->address1 }} {{ $client->address->address2 }} {{ $client->address->city }} {{ $client->address->state }} {{ $client->address->zip }}
@stop
I get a blank page woth no error and no source, if i check my \storage\app\db-blade-compiler\views folder it has generated a correct view containing
<?php $__env->startSection('template'); ?>
Hello <?php echo e($client->contacts[0]->firstname); ?><br><br>I hear your address is <?php echo e($client->address->address1); ?> <?php echo e($client->address->address2); ?> <?php echo e($client->address->city); ?> <?php echo e($client->address->state); ?> <?php echo e($client->address->zip); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('Clients.Documents.templatemaster', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
any idea why the page is blank?
Been trying all sorts of stuff all weekend, if i force the template to have some kind of error, such as an undefined variable by not passing it $client, then I get the error message, but as soon as I fix the error by say passing $client or removing all instances of $client from the template then it just comes up blank again.
I have tried removing the extends functionality so it is just a basic standalone view with no data in it other than "hello world" and still get the same issue. The only thing i can think of that I have not tested yet is that I am using PHP 7, any idea if that would cause an issue?
on my production server debian server I get a different issue with the same code
[2016-07-05 15:32:42] production.ERROR: ErrorException: file_put_contents(/storage/app/db-blade-compiler/views/f23d182793b88f8e876d8a0709f5a6fe): failed to open stream: No such f
ile or directory in /bootstrap/cache/compiled.php:7366
so its not even generating the view there?
Fixed it, nothing wrong with your plugin, I was being a dumbass