jeudi 8 mars 2018

Undefined constant 'App\App\projects

i have created a model called company and projects but projects,i need to show a projects under a company the company is showing fine but when i added project realtion in the model it dispays the error.I am a newbie to laraval

Undefined constant 'App\App\projects' (View: C:\xampp\htdocs\testdrive\resources\views\companies\show.blade.php)

C:\xampp\htdocs\testdrive\app\company.php

use Illuminate\Database\Eloquent\Model;

class company extends Model
{
    //
    protected $fillable=[
        'name',
        'description',
        'user_id'

    ];

public function user()
{
    return $this->belongsTo(App\User);
}

public function projects()
{
    return $this->hasMany(App\projects);
}

}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2oXi2FN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire