37 lines
641 B
PHP
37 lines
641 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* @mixin IdeHelperRequestedQuote
|
|
*/
|
|
class RequestedQuote extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'quote',
|
|
'user_id',
|
|
];
|
|
|
|
public function approve(): void
|
|
{
|
|
// TODO: we'll probs want to log who approved this quote
|
|
Quote::create([
|
|
'quote' => $this->quote,
|
|
]);
|
|
|
|
$this->delete();
|
|
}
|
|
|
|
public function reject(): void
|
|
{
|
|
// TODO: we'll probs want to log who reject this quote
|
|
|
|
$this->delete();
|
|
}
|
|
}
|