skip to Main Content

Laravel 11 – validated() and related table

I'd like to insert the user-id of the current user into a table in column "user_id". The field is a relation to the user table. Migration / database schema Schema::create('pdlocations', function (Blueprint $table) { $table->id(); $table->timestamps(); $table->decimal('lon', 10, 7); $table->decimal('lat',…

VIEW QUESTION

Laravel 11 Middleware route group api doesnt work

I have a api project with Laravel 11, and i want to make a middleware for admin api. AdminMiddleware.php (custom middleware) <?php namespace AppHttpMiddleware; use Closure; use IlluminateHttpRequest; use IlluminateSupportFacadesAuth; use SymfonyComponentHttpFoundationResponse; class AdminMiddleware { /** * Handle an incoming…

VIEW QUESTION

Laravel – Sluggable without name column

In a Laravel 11 project, I have installed Sluggable package to generate slugs in my project (composer require cviebrock/eloquent-sluggable). I have a model called Tag which will store all the tag information in a json column. Schema::create( 'tags', function( Blueprint…

VIEW QUESTION
Back To Top
Search