danherbert-io / elide-simple-starter-kit
The skeleton application for the Laravel framework, setup to use Elide for Laravel.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/danherbert-io/elide-simple-starter-kit
Requires
- php: ^8.2
- danherbert-io/elide-for-laravel: ^1.0
- laravel/framework: ^11.0|^12.0
- laravel/tinker: ^2.10.1
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pail: ^1.2.2
- laravel/pint: ^1.13
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^11.5.3
README
Getting started
laravel new --using=danherbert-io/elide-simple-starter-kit
Quick rundown
This starter kit is a fresh Laravel 12 project + Elide, with some initial templates and routes to get things moving quickly.
It is configured to use Elide/HTMX, Tailwind, and TypeScript.
With regard to HTMX, it also loads the Idiomorph extension in the root application view to support DOM morphing, should you desire.
Pages/routes/controllers include:
- Home page
- Guest pages:
- Log in
- Register
- Reset password
- Profile settings page:
- Profile form
- Reset password form
- Delete account form
Models
This kit includes the default User model and migrations of a fresh Laravel project.
It also includes an abstract App\Models\Model class which can automatically provide a ->uuid property for new models if a model implements the App\Contracts\HasModelUuid interface.
There is also a App\Contracts\HasCommonModelProperties interface which declares common model properties (id+timestamps) via the DocBlock. Useful for IDEs.
Views/Components
The kit contains a number of components with corresponding Blade template files.
App\View\Components\Page\**- All the pages of the kitApp\View\Components\Form\**- All the forms of the kitApp\View\Components\Ui\**- Various UI components making up the kit, eg:LoadingIndicatorSiteFooterandSiteHeaderToastNotification- A small set of controls under
App\View\Components\Ui\Control
App\View\Components\Todo- A simple "@TODO" style component for use when building out UIs.
Email notifications
It includes a "welcome" email notification for new accounts, and a "profile deleted" email notification for when users delete their accounts.
Toast notifications
The AppServiceProvider and root application view also boots support for sending toast notifications to the frontend.
This can be done like this:
Route::get('make-success-notification', function() { return redirect(...) ->with('toast-success', 'This was a success!'); });
Supported toast types are:
toast-notificationtoast-infotoast-successtoast-warningtoast-danger
PS - in the spirit of "no build", these toast notifications are self-contained DOM components. You can learn more about them and customise them by looking at:
App\View\Components\Ui\ToastNotificationresources/views/components/ui/toast-notification.blade.php
Composer
There is a composer reset-db command defined, which will wipe the database, run migrations, and run the seeder.
Tests
This kit includes a range of baseline tests similar to the Laravel React Starter Kit.