Im new to laravel , i have created migration and the table (hotelroom) earlier but forgot to create the model for the same ,bu now after creating the model and trying to retrieve the data , im getting above error
This is where it highlights the error
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use app\hotelroom;
class manage_roomscontroller extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
$arr['hotelrooms']=hotelroom::all();
return view('admin.rooms.index')->with($arr);
}
}
Arguments
"Class 'app\hotelroom' not found"
``````````````````````````````````
model ( located under app directory)
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class hotelroom extends Model
{
}
can someone tell me where the issue is? is it because i have created the model later ?( not at the same time while I created the migration). or its some other issue?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire