title: Serialization of 'Closure' is not allowed - laravel
body: <p>I'm trying to create a tuple in my table. The data is from a form or received.
  My database:
  <img src="https://i.stack.imgur.com/CAyID.png" alt="enter image description here"></p>
  
  <p><strong>View</strong></p>
  
  <pre><code>@extends('plantilla')
  @section('contenido')
  &lt;div class="formulario"&gt;
  {{Form::open(array('url' =&gt; 'servicio/create', 'files' =&gt; true))}}
  
      &lt;input type="text" class="form-control"  id="direccion" name="dirrecion" placeholder="Dirección" &gt;
      &lt;input type="text" class="form-control"  id="cliente" name="cliente" placeholder="Nombre Cliente" &gt;
      &lt;input type="time" name='horainicio' id='horainicio' min='time' max='time' &gt;
      {{Form::file('pdf', array('title' =&gt; 'Search for a file to add'))}}
      {{Form::select('idtecnico', $tecnico_selector)}}
      {{ Form::submit('Guardar', array('class' =&gt; 'btn btn-primary ')) }} 
  {{Form::close()}}
      &lt;/div&gt;  
      @stop
  </code></pre>
  
  <p><strong>Route</strong></p>
  
  <pre><code>Route::get('servicio/create', function(){
  $tecnicos = Tecnico::all();
      $tecnico_selector = array();
      foreach ($tecnicos as $tecnico) {
          $tecnico_selector[$tecnico-&gt;idTecnico] = $tecnico-&gt;Nombre;
      }
      return View::make('formservicio', array('tecnico_selector' =&gt; $tecnico_selector));
   });
   Route::post('servicio/create', array('uses' =&gt; 'ServicioController@doCreate'));
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>class Servicio extends Eloquent{
  protected $table = 'Servicio';
  protected $primaryKey = 'idServicio';
  protected $fillable = array(
                              'Direccion',
                              'RutaPDF',
                              'Completado'
                              );
  public function materialUsado(){
      return $this-&gt;hasMany('Material_Usado', 'idMaterial_Usado');
  }
  
  public function tecnicos(){
      return $this-&gt;belongsToMany('Tecnico', 'Servicio_Tecnico', 'Servicio_idServicio', 'Tecnico_idTecnico');
  }
      }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>class ServicioController extends BaseController{
  public function doCreate(){
      $rules = array(
                  'idtecnico' =&gt; 'required',
                  'direccion' =&gt; 'required',
                  'cliente' =&gt; 'required'
                  );
      $validator = Validator:: make(Input::all(), $rules);
  
      if($validator-&gt;fails()){
          return Redirect::to('servicio/create')
                  -&gt;withErros($validator)
                  -&gt;withInput();
      }else{
          $input = array(
                  'Direccion' =&gt; Input::get('direccion'),
                  'Cliente' =&gt; Input::get('cliente'),
                  'Completado' =&gt; '0'
                  );
  
          Servicio::create($input);
          /*$servicio = new Servicio;
          $servicio-&gt;Direccion = Input::get('direccion');
          $servicio-&gt;Cliente = Input::get('cliente');
          $servicio-&gt;Completado = '0';
          $servicio-&gt;tecnicos-&gt;attach($idtecnico);
          $servicio-&gt;save();*/
  
          $path = public_path().'/servicio/'.$servicio-&gt;idServicio;
          File::makeDirectory($path, $mode = 0777, true, true); // creamos la carpeta
          $archivoPdf = Input::file('pdf');
          $archivoPdf-&gt;move($path, 'servicio');
  
          /*$servicio-&gt;RutaPDF = $path.'/servicio';
          $servicio-&gt;save();*/
  
  
  
  
  
  
  
      }
  }
  }
  </code></pre>
  
  <p>When completely changes the form and send it, the following error</p>
  
  <p><img src="https://i.stack.imgur.com/bI38R.png" alt="enter image description here"></p>
  
  <p>how can I fix it?</p>