2
フォルダ構造:私はどのようにして、モデルクラスと他のモデルクラスのフォルダとの関連を確立できますか?
app |-Admin.php |-Admin | |-Product.php Admin.php -------------------------------------------------------- namespace App; use Illuminate\Foundation\Auth\User as Authenticatable; class Admin extends Authenticatable { public function erp() { return $this->belongsToMany(Admin\Product::class); } } ----------------------------------------------------------- Product.php ----------------------------------------------------------- namespace App\Admin; use Illuminate\Database\Eloquent\Model; class Product extends Model { protected $primaryKey = 'productcode'; public $incrementing = false; public function updatedBy() { return $this->belongsTo(Admin::class); } } -----------------------------------------------------------
しかし、エラークラスの管理::クラス 'が見つかりません 任意のソリューションを持って?
お願いします dowvoteを説明してください。 –