Download the PHP package uteq/laravel-move without Composer
On this page you can find all versions of the php package uteq/laravel-move. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uteq/laravel-move
More information about uteq/laravel-move
Files in uteq/laravel-move
Package laravel-move
Short Description Laravel admin panel powered by Livewire and Jetstream
License MIT
Homepage https://github.com/uteq/laravel-move
Informations about the package laravel-move
Please use Filament over this package. This will package will be archived soon.
Laravel Move | An admin panel powered by Livewire and Jetstream
This package is still in development and does not have a complete test suite.
Move makes it very easy to create your own Admin Panel using Laravel and Livewire. This package was heavily inspired bij Laravel Nova. And works practically the same, except for some missing features.
Here is an example of how you can use it:
And this is a basic example with a user:
Todo
- Package dependencies
- Tests
Support us
To best support is by improving this package. There is still a lot work to be done. For example:
- Documentation -- Setup -- Fields (Also: Panel and Step) -- Search -- Actions -- Permissions -- Customizations -- Reuseable (Move re-usable in many ways)
- Test coverage
- Fields extension (adding all sorts of fields)
- Stubs and Class generators
- Cards (like Laravel Nova cards)
Installation
You can install the package via composer:
Laravel Move will add Jetstream to your vendor folder, but will not install it automatically. So, for your convenience we tailor made a command that will install Jetstream and bootstrap the Move Admin Panel. Because Move uses Livewire as the preferred stack you do not have to supply the stack. In addition, you may use the --teams switch to enable team support:
To finalize your installation run:
Optional
Configure Jetstream
For more Jetstream related setup, please check: https://jetstream.laravel.com/2.x/installation.html#installing-jetstream
You can publish the config file with:
You can publish the view files with:
Usage
Creating your first resource
Start by creating your first Move Resource. You can generate it or use the example below:
Generate your resource
Use example resource
Route prefix
Move out of the box adds a prefix to your resources, that way it will never interfere with your own routes.
The default is move
.
You can change the default prefix by overwriting it at your local MoveServiceProvider at App\Providers\MoveServiceProvider
:
Manually Registering Resource Namespaces
The default namespace for Move is App\Move
. You are also able to register the Move Resources wherever you like.
You can Bootstrap this namespace in the following way
This will automatically create the namespace for the routes. The default route for this namespace will be:
The resource default name will than be:
Using a json field to store data
If you work a lot with data structures that cannot be clearly defined in a mysql database structure. You will probably opt for something like a json field.
First add your json field to your table.
Than make sure you cast it properly in you model
At last, add a field to your resource
Resources
Supported Field types
These are the currently supported fields in Move:
- Country
- Date
- Files
- Id
- Number
- Password
- Select (with filter search)
- Status
- Text
- Textarea
- Editor
Sidebar
Move automatically registers resources to the sidebar. By default there are two ways to show your sidebar resources. Grouped and flat. The default is grouped and is published with the \App\Providers\MoveServiceProvider.
To use the flat display, just change to
When you use the sidebar groups you should also set the resource property:
Ordering sidebar items
Currently, this is not a supported feature, feel free to create a PR. Or you can simply overwrite the components/sidebar-menu.blade.php file.
Ordering sidebar by namespace
Whenever you would prefer to order your sidebar by the given namespace just use the grouped sidebar approach. If not you can always overwrite the components/sidebar-menu.blade.php file or create a PR.
Overwrite the sidebar menu logo
Overwriting the sidebar menu items
You can completely overwrite the sidebar items. And the logo.
You can also keep the automatically generated sidebar items and add you own before the automatic created. This is the default behavior.
In depth
Resolving a resource
Resolving a resource means loading the concrete implementation of your Resource class. You can do this by providing the name of your resource:
Overwriting the default $actionHandlers
Action handlers are classes that make it possible to store and delete your resources the way you prefer. By default Move will have its own default logic.
Move provides two default action handlers Uteq\Move\DomainActions\StoreResource
and Uteq\Move\DomainActions\DeleteResource
.
You are able to overwrite these handlers from your Resource and by default.
Creating your own Action handler
You can also extend the default StoreResource, but this is not mandatory.
Overwriting the default $actionHandlers system wide
Overwrite the action handlers from a ServiceProvider. `
Overwriting the default $actionHandlers from your resource
Simply add the $actionHandlers to your resource:
This will overwrite the resource specific action handlers.
Hooks
Model Before save
The preferred way to hook into the before save is using the default Laravel events https://laravel.com/docs/eloquent#events. You can also hook into the Store action by adding a beforeSave method that provides callables
Model After save
The preferred way to hook into the after save is using the default Laravel events https://laravel.com/docs/eloquent#events. You can also hook into the Store action by adding a afterSave method that provides callables
Field Before save
Whenever you need to change to way a field stores (creates or updates) it's data.
You can hook into the beforeStore
method.
Every field has this method.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Nathan Jansen
- Leo Flapper
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-move with dependencies
ext-json Version *
ext-exif Version *
intervention/image Version ^2.7
laravel/jetstream Version ^2.6
livewire/livewire Version ^2.10
maatwebsite/excel Version ^3.1
spatie/data-transfer-object Version ^2.6|^3.7
spatie/laravel-medialibrary Version ^10.0