- Created a dedicated UserDashboardController to handle user-related logic. - Added deal listing views and components for users, including action toolbars, broker contact, and stat badges. - Refactored UI components to support new features like toggle buttons and improved input handling. - Updated routes with a new prefix for user-related pathways, ensuring a better structure across dashboards.
20 lines
392 B
PHP
20 lines
392 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Deal extends Model
|
|
{
|
|
public function broker(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
|
|
public function category(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DealCategory::class, 'deal_category_id');
|
|
}
|
|
}
|