Hello! So for some reason laravel is not finding my model. I am really new to laravel and i do not really get why. Does someone want to help me?
my code:
The "model"
<?php
namespace app\Models\posts;
class posts {
public static function all() {
return [
[
'id' => 1,
'title' => 'dunno',
'desc' => 'also'
],
[
'id' => 2,
'title' => 'Cheeseburger',
'desc' => 'That food tastes nice :)'
]
];
}}
and the web.php
<?php
use Illuminate\Support\Facades\Route;
use app\Models\posts;
Route::get('/', function () {
return view('index', [
'posts' => posts::all()
]);
});