get clients

This commit is contained in:
2023-03-03 17:22:05 +01:00
parent 798996b615
commit 8bc9e962b7
7 changed files with 219 additions and 0 deletions

26
app/Models/Clients.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Clients extends Model
{
use HasFactory;
protected $table = "clients";
protected $primaryKey = "id";
public $incrementing = true;
public $timestamps = true;
protected $casts = [
'adresse' => 'json',
'created_at' => 'timestamp',
'updated_at' => 'timestamp',
];
public function Commandes(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany('App\Models\Commandes', 'clients_id', 'id');
}
}