Answer the question
In order to leave comments, you need to log in
Are namespaces related to folder structure?
Actually the question is in the header. But just in case, I'll clarify.
Laravel created a TestUser model for me in the app\ folder
namespace App;
use Illuminate\Database\Eloquent\Model;
class TestUser extends Model
{
//
protected $table = 'test';
}
use App\TestUser;
Route::get('/', function () {
$t = TestUser::all();
var_dump($t);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question