How to create a lot of categories for card laravel voyager
image image2 Now I have like this image3 but I want have more categories like this How to select many category?
image image2 Now I have like this image3 but I want have more categories like this How to select many category?
in the nova resource I can define an image field with a media library addon package like: Images::make('Main image', 'media_main') ->setFileName(static function($originalFilename, $extension) { return md5($originalFilename) . '.' . $extension; }), How can I use a function from the resource…
I'm trying to figure out my issue with passing props to a react component. The project is completely stock (Laravel 9.19, standard Inertia installation). The problem is I do not receive any props when I check my React DevTools in…
I have wondered about my current database design I made for my uni organization website. In general this website is for displaying informations and events. The event is different for each departement. It does some normal things like displaying event,…
I have used Laravel 7 for my project. This project has a many-to-many relationship between two tables named "orders" and "products." The following is my code for the "order" model. public function products() { return $this->belongsToMany('AppProduct') ->withPivot('quantity', 'unit_discount', 'unit_price'); }…
I use Axios to get cookies from http://localhost/sanctum/csrf-cookie My app doing requests from localhost:3000 which is configured by Nuxt. My backend configured by Laravel sanctum at localhost:80 After the GET request, I have the following cookies set in my headers:…
My code is: settings.blade.php (blade): <form method="POST" action="{{route('user.settings', $apartment->apartment_id)}}"> @method('delete') @csrf <button type="submit" class="btn btn-danger btn-sm">Delete</button> </form> UserController.php: public function delete(Apartment $apartment) { $apartment->delete(); return redirect()->route('dashboards.users.index') ->withSuccess(__('Deleted successfully')); } web.php: //Authorization based on user role Route::group(['prefix'=>'user', 'middleware'=>['isUser','auth','PreventBackHistory']], function(){ Route::get('dashboard',[UserController::class,'index'])->name('user.dashboard'); Route::delete('settings/{apartment}',[UserController::class,'delete'])->name('settings.delete');…
I make React(17) Laravel(9.31) project. I try implement routing in the frontend.("react-router-dom": "^5.0.0") but same result with 6. I used now one blade (index) and send everyting here. index and main blade have a connection(yield). The main blade forms the…
I have created Laravel application based on this guide: https://bootcamp.laravel.com/ PHP 8.1.2 Laravel 9.33.0 React When working with VITE as dev (npm run dev), everything is OK But when building JS and CSS with VITE (npm run build), then I…
DB::table('visitors') ->join('event_visitor', 'visitors.id', '=', 'event_visitor.visitor_id')->where('sex', 0) ->where('event_visitor.event_id', 1) ->count(); this is the query to get the count of men at the visitor's table with an event id of 1 I want to get the record count of men women and…