mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
(show poster on checkout page if concert has one)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Exceptions\NotEnoughTicketsException;
|
||||
|
||||
class Concert extends Model
|
||||
@@ -124,4 +125,14 @@ class Concert extends Model
|
||||
{
|
||||
return $this->orders()->sum('amount') / 100;
|
||||
}
|
||||
|
||||
public function hasPoster()
|
||||
{
|
||||
return $this->poster_image_path !== null;
|
||||
}
|
||||
|
||||
public function posterUrl()
|
||||
{
|
||||
return Storage::disk('public')->url($this->poster_image_path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user