public function getModifyPub($id)
 {
     $pub = Publicaciones::find($id);
     $title = "Modificar publicacion | pasillo24.com";
     if ($pub->tipo == 'Lider') {
         $url = "usuario/publicacion/modificar/lider/" . $id;
     } elseif ($pub->tipo == 'Habitual') {
         $url = "usuario/publicacion/modificar/habitual/" . $id;
     } elseif ($pub->tipo == 'Casual') {
         $url = "usuario/publicacion/modificar/casual/" . $id;
     }
     $categorias = Categorias::all();
     $subCat = SubCat::all();
     $departamento = Department::all();
     if ($pub->categoria == 34) {
         $marcas = Marcas::all();
         $modelos = Modelo::where('marca_id', '=', $pub->marca_id)->get();
         return View::make('publications.modifyPub')->with('title', $title)->with('tipo', $pub->tipo)->with('publicaciones', $pub)->with('url', $url)->with('categorias', $categorias)->with('subCat', $subCat)->with('departamento', $departamento)->with('marcas', $marcas)->with('modelos', $modelos);
     } else {
         return View::make('publications.modifyPub')->with('title', $title)->with('tipo', $pub->tipo)->with('publicaciones', $pub)->with('url', $url)->with('categorias', $categorias)->with('subCat', $subCat)->with('departamento', $departamento);
     }
 }
 public function getPublicationNormal()
 {
     $title = "PublicaciĆ³n HABITUAL | pasillo24.com";
     $marcas = Marcas::all();
     $url = 'usuario/publication/estandar/enviar';
     $departamento = Department::all();
     $categorias = Categorias::where('deleted', '=', 0)->where('tipo', '=', 1)->orderBy('nombre')->get();
     $otros = new StdClass();
     foreach ($categorias as $c) {
         if (strtolower($c->nombre) == 'otros') {
             $otros->id = $c->id;
             $otros->nombre = $c->nombre;
         }
     }
     if (!isset($otros->id)) {
         $otros->id = '1000';
         $otros->nombre = 'Otros';
     }
     $servicios = Categorias::where('deleted', '=', 0)->where('tipo', '=', 2)->orderBy('nombre')->get();
     $otros2 = new StdClass();
     foreach ($servicios as $c) {
         if (strtolower($c->nombre) == 'otros') {
             $otros2->id = $c->id;
             $otros2->nombre = $c->nombre;
         }
     }
     if (!isset($otros2->id)) {
         $otros2->id = '1000';
         $otros2->nombre = 'Otros';
     }
     $textos = Textos::where('id', '=', 2)->first();
     return View::make('publications.publicacion')->with('title', $title)->with('tipo', 'normal')->with('marcas', $marcas)->with('url', $url)->with('categorias', $categorias)->with('texto', $textos)->with('departamento', $departamento)->with('servicios', $servicios)->with('otros', $otros)->with('otros2', $otros2);
 }