Ejemplo n.º 1
0
 public static function show($model, $name, $value, $label, $params)
 {
     if ($params) {
         $params_array = json_decode($params, true);
         if (isset($params_array['model'])) {
             $nameHasModel = strtolower($params_array['model']);
             $hasModel = \DB::table($nameHasModel)->get();
             $t = \App\Http\Models\News::where($name, '=', $value)->first()->{$nameHasModel};
             return view("admin.parsers.hasOne_show", ["name" => $name, "value" => $value, "label" => $label, "selected" => $t, "hasModel" => $hasModel])->render();
             //dd($t);
         }
     }
     $t = \DB::table($model)->where($name, '=', $value)->first();
     //dd($t);
 }
Ejemplo n.º 2
0
 /**
  * Show the application welcome screen to the user.
  *
  * @return Response
  */
 public function index()
 {
     $p = News::find(2)->test;
     dd($p);
     return view('welcome');
 }