Your ROOT_URL in app.ini is http://167.99.32.63:3000/ but you are visiting http://167.99.32.63/ibrahim/BAGETWEBPANEL/src/branch/KARATAS/app/Models/DMReview.php You should set ROOT_URL correctly, otherwise the web may not work correctly.
 
 

38 lines
770 B

<?php
namespace App\Models;
use App\Models\User;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Model;
class DMReview extends Model
{
protected $casts = [
'delivery_man_id' => 'integer',
'order_id' => 'integer',
'user_id' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime'
];
public function customer()
{
return $this->belongsTo(User::class,'user_id');
}
public function order()
{
return $this->belongsTo(Order::class);
}
public function delivery_man()
{
return $this->belongsTo(DeliveryMan::class,'delivery_man_id');
}
public function scopeActive($query)
{
return $query->where('status',1);
}
}