skip to Main Content

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

Calling a schedule on a function in Laravel console.php

I want to call a function in console.php as a schedule. Here is my console.php code: <?php use AppHttpControllersAuctionController; use IlluminateSupportFacadesSchedule; Schedule::call(function () { ([AuctionController::class, 'endAuction']); echo 'Zakończono aukcję.'; })->everyTenSeconds(); Here is my function code: public function endAuction(Request $request, $id)…

VIEW QUESTION
Back To Top
Search