Cant create relation "Belongs To" receiving error:
Model Class does not exist. Please create Model before creating relationship.
"Has One", "Has Many", "Belongs To Many" also failing to create
Models are generated (made via "create new table"), but they are empty:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class vehicles extends Model
{
}
If that code is the full model that it generated then it looks like the problem is that the Model class wasn't imported. Try adding the following above the class declaration.
use Illuminate\Database\Eloquent\Model;
Hi,
I have same issue with @kolep8 , use generated models too (model class was imported) and i also trying to use models from make model command, but it still showing the "Model class not exist" error.
Any solution for this?
Thanks.
Hi Andhika, boleh lihat script modelnya ?
@kolep is your model name you generated as same as with what you typed on BREAD editor ? AppVehicle or AppVehicles ?
I see you your model name used plural and lowercase. cmiiw
Halo mas @jambari , ini script model kosongan yg di-generate:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class JudgeCategory extends Model
{
//
}
Dan pas di pop-up relationship, harusnya kan muncul field list untuk dipilih, tp ini cuma angka2 gitu:

Thanks.
itu diganti AppJudgeCategory bukan App/JudgeCategory
Ini udah bs create relationship, tp masih error yg di bagian display & store field list-nya:

Apa tidak seharusnya JudgeCategory yang belongs to Judge ?
Guys, English please... Nobody else will be able to jump in to help if you speak other languages
Also, @kolep8's issue was closed. Please consider opening your own or discussing on our Slack group instead.
I got the same problem , and still don t know what is the solution . If someone could make it clear , i d be grateful .
The solution is to open your own issue or ask in our Slack group. This issue has been closed for nearly 9 months now, and was for a significantly older release.
Most helpful comment
Guys, English please... Nobody else will be able to jump in to help if you speak other languages
Also, @kolep8's issue was closed. Please consider opening your own or discussing on our Slack group instead.