smousss / laravel-novalize
Generate Laravel Nova admin panels at light speed using GPT-4!
Installs: 3 740
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: ^8.1
- illuminate/contracts: ^9.0|^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
Create Laravel Nova admin panels at light speed!
Smousss generates Laravel Nova resources in a few seconds using GPT-4 to help you speed up your admin panel's development.
namespace App\Nova; use … class Post extends Resource { public static $model = \App\Models\Post::class; public static $title = 'title'; public static $search = [ 'id', 'title', 'slug', 'content', 'description', ]; public function fields(Request $request) { return [ ID::make()->sortable(), BelongsTo::make('User'), Text::make('Title') ->rules('required', 'max:255'), Slug::make('Slug') ->from('Title') ->rules('required', 'max:255') ->creationRules('unique:posts,slug') ->updateRules('unique:posts,slug,{{resourceId}}'), Textarea::make('Content') ->rules('required'), Textarea::make('Description') ->rules('required'), HasMany::make('Comments'), BelongsToMany::make('Tags'), HasMany::make('Pins'), ]; } }
Installation
Install the package via Composer:
composer require smousss/laravel-novalize
Publish the config file:
php artisan vendor:publish --tag=novalize-config
Usage
- First, generate a secret key on smousss.com.
- Add it to your
SMOUSSS_SECRET_KEY
environment variable. - Then, create a Nova resource based on your Post model:
php artisan smousss:novalize App\\Models\\Post
. Or for multiple models:php artisan smousss:novalize App\\Models\\Post App\\Models\\Comment
Credit
Novalize for Laravel has been developed by Benjamin Crozat for Smousss (Twitter).