Download the PHP package sleekcube/admingenerator without Composer
On this page you can find all versions of the php package sleekcube/admingenerator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sleekcube/admingenerator
More information about sleekcube/admingenerator
Files in sleekcube/admingenerator
Package admingenerator
Short Description A package that creates an admin interface for an entity
License MIT
Informations about the package admingenerator
Admin Generator
This package is an admin generator that help you generate an admin interface based on the database structure. Its main goal is to quickly create the necessary files to create a CRUD for an entity. The generator is built using the laravel framework and vue JS framework.
The following files are created:
- The model
- The validation request
- The request transformer
- The controller
- The index and create vue files
- The api routes
- The JS routes
Additionally, the package provides the following files:
- The admin and locale middleware
- A user model
- A page, block and seo structure for general pages
- An image handling structure
- Admin layout
The package is dependant on the following packages as well to quickly set up the project:
- Sluggable by cviebrock to generate slugs for models
- Translatable by dimsav to provide translation for models
- Laravel Socialite to allow login with FB, Google or Github
- Intervention image to handle images
- Laravel passport to manage tokens
- Laravel spatie permission to manage roles and permissions
- Laravel fractal to mask database structure to improve security
- Doctrine dbal to analyse db structure
Installation
On a fresh laravel installation, you can install this package by running the following command:
Once installed, you need to setup laravel to use this package. Simply run the following command:
Once done, run
After this, you need to hook up a database with your laravel application.
Run the following commands:
Once this is done, you should try to access the /admin route of your application. Ideally, you'd hook up the application with a v-host. Either way, be sure to change the APP_URL in your.env file. As you can see in your UserSeeder, you have an admin with username: [email protected] and password: secret
How to use the package
The package provides three commands for three types of database structure.
-
An unrelated, standalone model
-
A related model
- A translated model
NB: The model name needs to in singular form.
The package also provides a scheduler command. This allows you to order your migrations. First you need to publish the package config:
In your config directory, you will find a sleekcube.php file. Here you can define an array as follows:
After the migration is done, to recompile your assets, you need to run
Example
This will create the following migrations
Recompile your assets and checkout the following urls:
- /admin/tag
- /admin/article
- /admin/blog
Hazza
Constraints
As a security feature, the id of the model is masked from the front. The mapping is always done using slugs which means that the model always need to have a string which will be used as the source for the slug generation.
Future Developments
- Test for the package
- Generation of tests for the CRUD generated
- Linking translated models
- Cater for many-to-many relationships
- Cater for has-Many relations
- Handle more form types. Currently only, string, text and integer
All versions of admingenerator with dependencies
cviebrock/eloquent-sluggable Version ^4.6
dimsav/laravel-translatable Version ^9.0
laravel/passport Version ^7.0
laravel/socialite Version ^3.1
spatie/laravel-fractal Version ^5.4
spatie/laravel-permission Version ^2.12
intervention/image Version ^2.4