I have controller like this $test= test::find($id); return $test;
return null but when I change it to
$test= test::where('id',$id)->get();
return $test;
return all value of $test My migration is
Schema::create('tests', function (Blueprint $table) {
$table->increments('id');
$table->string('user', 20);
}),
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/20Fgviw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire