mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
72 - Extracting a Finder Method
This commit is contained in:
@@ -22,6 +22,11 @@ class Order extends Model
|
||||
return $order;
|
||||
}
|
||||
|
||||
public static function findByConfirmationNumber($confirmationNumber)
|
||||
{
|
||||
return self::where('confirmation_number', $confirmationNumber)->firstOrFail();
|
||||
}
|
||||
|
||||
public function concert()
|
||||
{
|
||||
return $this->belongsTo(Concert::class);
|
||||
|
||||
Reference in New Issue
Block a user