Finished blade designs and methods and added sortable lists
This commit is contained in:
@@ -4,11 +4,21 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
|
||||
class Beer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Sortable;
|
||||
|
||||
public $sortable = [
|
||||
'beer',
|
||||
'rating',
|
||||
'country',
|
||||
'type'
|
||||
];
|
||||
|
||||
public function list()
|
||||
{
|
||||
return $this->belongsToMany(BeerList::class, 'beer_list_pivot', 'beer_id', 'list_id');
|
||||
|
||||
Reference in New Issue
Block a user