Closed alrik11es closed 1 year ago
When you run php artisan crud:install
below Auth routes will be added to the routes file if you choose to Install Auth. If you dont install Auth, Below will not be added. This is from laravel/ui package
//Route Hooks - Do not delete// Auth::routes(); Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
When you run php artisan crud:generate posts
below Routes are added to the below //Route Hooks - Do not delete//
Route::view('posts', 'livewire.posts.index')->middleware('auth');
Let me know if above helps.
Thanks for adding some examples. Strangely it didn't get populated when I ran the command. It seems there is some problem there.
Can you run below command and advise if still issues; Just to test on a new Project, because I did and it worked as expected.
Please create and migrate posts migration file before running last command, or create any table of your choice in the database.
Run composer create-project laravel/laravel:8 myapp
to create laravel 8 project.
composer create-project laravel/laravel myapp
composer require flightsadmin/livewire-crud
php artisan crud:install
php artisan crud:generate posts
Oh! I forgot to run php artisan crud:install
.
Thanks for the help.
I've been messing with this crud generator. I've struggled to get routes working. How about suggest the user some route configs? Or just point to the way to use the CRUD results.