Bueno mi consulta es porque ya lei mil veces mi codigo y no encuento donde esta el error, tengo una app en php puro que estoy intentando integrar con laravel pero no encuentro el error del syntax error, unexpected end of file
cree el modelo, la vista y el controlador, hasta ahi todo bien pero al reflejar los datos mediante un SENDER, me arroja el error, ya lei el codigo y no encuentro donde esta el error:
@section('titulo')
<h1>Crear Firma</h1>
@endsection
@section('content')
@if (Auth::check())
@if(Auth::user()->firmas == 1)
@if(!empty($_REQUEST['Sender'])):
$sender = $_REQUEST['Sender'];
$layout = file_get_contents('$datos->plantilla', FILE_USE_INCLUDE_PATH);
@foreach ($sender as $key => $value) {
$key = strtoupper($key);
$start_if = strpos($layout, '[[IF-' . $key . ']]');
$end_if = strpos($layout, '[[ENDIF-' . $key . ']]');
$length = strlen('[[ENDIF-' . $key . ']]');
@if (!empty($value)) {
// Add the value at its proper location.
$layout = str_replace('[[IF-' . $key . ']]', '', $layout);
$layout = str_replace('[[ENDIF-' . $key . ']]', '', $layout);
$layout = str_replace('[[' . $key . ']]', $value, $layout);
} @elseif (is_numeric($start_if)) {
// Remove the placeholder and brackets if there is an if-statement but no value.
$layout = str_replace(substr($layout, $start_if, $end_if - $start_if + $length), '', $layout);
} @else {
// Remove the placeholder if there is no value.
$layout = str_replace('[[' . $key . ']]', '', $layout);
}
}
// Clean up any leftover placeholders. This is useful for booleans,
// which are not submitted if left unchecked.
$layout = preg_replace("/\[\[IF-(.*?)\]\]([\s\S]*?)\[\[ENDIF-(.*?)\]\]/u", "", $layout);
@if (!empty($_REQUEST['download'])) {
header('Content-Description: File Transfer');
header('Content-Type: text/html');
header('Content-Disposition: attachment; filename=efirma.html');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
}
@if (!empty($_REQUEST['Guardar'])) {
header('Content-Description: File Transfer');
header('Content-Type: text/html');
header('Content-Disposition: attachment; filename=efirma.html');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
}
echo $layout;
@else: }}
<form name="formulario" role="form" class="form-horizontal" method="post" target="preview" id="form">
<div class="form-group row">
<label for="nombre_cliente" class="col-md-1 control-label">Nombre</label>
<div class="col-md-3">
<input type="text" class="form-control input-sm" id="nombre_cliente" name="Sender[nombre]" placeholder="Selecciona un empleado" required>
<input id="id_cliente" type='hidden'>
</div>
<label for="Puesto" class="col-md-1 control-label">Puesto</label>
<div class="col-md-3">
<input type="puesto" class="form-control" id="puesto" name="Sender[puesto]" placeholder="Gerente administrativo" readonly>
</div>
<label for="Email" class="col-md-1 control-label">Correo</label>
<div class="col-md-3">
<input type="email" class="form-control" id="email_cliente" name="Sender[correo]" placeholder="Ingresa tu Email" readonly>
</div>
</div>
<div class="form-group row">
<label for="Telefono" class="col-md-1 control-label">Telefono</label>
<div class="col-md-3">
<input type="telefono" class="form-control" id="telefono" name="Sender[telefono]" placeholder="+XX (XXX) XXX-XXXX" readonly="" value="{{ $datos->telefono_empleado }}">
</div>
<label for="Celular" class="col-md-1 control-label">Celular</label>
<div class="col-md-3">
<input type="celular" class="form-control" id="telefono_cliente" name="Sender[celular]" placeholder="+XX (XXX) XXX-XXXX" readonly>
</div>
<label for="Sitio" class="col-md-1 control-label">Sitio web</label>
<div class="col-md-3">
<input type="sitio" class="form-control" id="Sitio" name="Sender[sitio]" placeholder="www.ejemplo.com" value="{{ $datos->sitio_web }}" readonly>
</div>
</div>
<div class="form-group row">
<label for="Direccion" class="col-md-1 control-label">Direccion</label>
<div class="col-md-3">
<input type="direccion" class="form-control" id="direccion" name="Sender[calle]" placeholder="Av. Paseo Centenario 303310" value="{{ $datos->direccion }}" readonly>
</div>
<label for="Colonia" class="col-md-1 control-label">Colonia</label>
<div class="col-md-3">
<input type="colonia" class="form-control" id="Colonia" name="Sender[colonia]" placeholder="Zona Urbana Rio" value="{{ $datos->colonia }}" readonly>
</div>
<label for="Ciudad" class="col-md-1 control-label">Ciudad</label>
<div class="col-md-3">
<input type="ciudad" class="form-control" id="Ciudad" name="Sender[ciudad]" placeholder="Tijuana, B.C." value="{{ $datos->ciudad }}" readonly>
</div>
</div>
<div class="form-group row">
<label for="codigo" class="col-md-1 control-label">Codigo Postal</label>
<div class="col-md-3">
<input type="codigo" class="form-control" id="Codigo" name="Sender[codigo]" placeholder="22245" value="{{ $datos->codigo_postal }}" readonly>
</div>
<label for="facebook" class="col-md-1 control-label">Facebook</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Facebook" name="Sender[facebook]" value="{{ $datos->facebook }}" readonly>
</div>
<label for="instagram" class="col-md-1 control-label">Instagram</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Instagram" name="Sender[instagram]" value="{{ $datos->instagram }}" readonly>
</div>
<label for="twitter" class="col-md-1 control-label">Twitter</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Twitter" name="Sender[twitter]" value="{{ $datos->twitter }}" readonly>
</div>
<label for="youtube" class="col-md-1 control-label">Youtube</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Youtube" name="Sender[youtube]" value="{{ $datos->youtube }}" readonly>
</div>
</div>
<div class="form-group row">
<label for="linkedin" class="col-md-1 control-label">Linkedin</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Linkedin" name="Sender[linkedin]" value="{{ $datos->Linkedin }}" readonly>
</div>
<label for="google" class="col-md-1 control-label">Google+</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Google" name="Sender[google]" value="{{ $datos->google_plus }}" readonly>
</div>
<label for="pinterest" class="col-md-1 control-label">Pinterest</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Pinterest" name="Sender[pinterest]" value="{{ $datos->pinterest }}" readonly>
</div>
<label for="flickr" class="col-md-1 control-label">Flickr</label>
<div class="col-md-1">
<input type="checkbox" class="form-control" id="Flickr" name="Sender[flickr]" value="{{ $datos->flickr }}" readonly>
</div>
</div>
<div class="col-md-12">
<div class="pull-right">
<button id="preview" type="submit" class="btn btn-default" onclick="capturar()">
<span class="glyphicon glyphicon-refresh"></span> Ver Firma
</button>
<button id="download" class="btn btn-default" > Descargar Firma</button>
<input type="hidden" name="download" id="will-download" value="">
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#myModal">
<span class="glyphicon glyphicon-search"></span> Catalogo de empleados
</button>
</div>
</div>
</form>
</div>
<div class="row-fluid">
<div class="col-md-12">
@endif
@else
<h1>No tienes permisos para ver este modulo</h1>
<a href="{{ url('/register') }}">Comprar Modulo de firmas</a>
@endif
@endif
@endsection
@
para eso, sabiendo que@
en PHP es para silenciar los errores.