Restaurant Menu Management
Filament 4/5Shows how to build nested resources using restaurant menus with categories and dishes. Both categories and dishes can be reordered directly in the Filament table.
Get the Source Code:
Only This Example
$9
One-time payment
Full source code for Restaurant Menu Management
Downloadable ZIP file with the source code
Lifetime access to this example
Sign in with GitHub to buy
Sign in first, then complete your $9 checkout.
Best value — all 177 examples
View membership plans
FilamentExamples Membership
$99
/year
or
$199
lifetime
Access to code of all 177 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
30-day money-back guarantee
How it works
In this project, we have two Models:
- Category
- name
- position (for list ordering)
- dishes (HasMany relationship)
- Dish
- name
- price (stored as cents)
- position (for list ordering)
- category (BelongsTo relationship)
Models
Here are the contents of both models with fields and relationships defined.
app/Models/Category.php
use App\Observers\CategoryObserver;use Illuminate\Database\Eloquent\Factories\HasFactory;use Illuminate\Database\Eloquent\Model;use Illuminate\Database\Eloquent\Relations\HasMany;use Illuminate\Database\Eloquent\Attributes\ObservedBy; #[ObservedBy(CategoryObserver::class)]class Category extends Model{ use HasFactory; protected $fillable = ['name', 'position']; public function dishes(): HasMany { return $this->hasMany(Dish::class); }}
app/Models/Dish.php
use App\Observers\DishObserver;use Illuminate\Database\Eloquent\Factories\HasFactory;use Illuminate\Database\Eloquent\Model;use Illuminate\Database\Eloquent\Relations\BelongsTo;use Illuminate\Database\Eloquent\Attributes\ObservedBy; #[ObservedBy(DishObserver::class)]class Dish extends Model{ // ...
Next, we will:
- Create resources
- Create reordering actions
- Create related records
- Create Nested Resource
- Manage Resources
The FULL tutorial is available after the purchase: in the Readme file of the official
repository you would get invited to.