skip to Main Content

laravel 9 anchor button returning error 404

Im using an achor to click a button to navigate to other page. However, it doesnt work and return a 404 error not found. My destination blade is : inventory.blade.php: <a class="d-xl-flex align-items-xl-center" href="{{ url('inventory/add')}}" style="padding-right: 0px;margin-right: 15px;"><button class="btn btn-primary…

VIEW QUESTION

Making a custom laravel directive to detect if view is served on mobile or desktop

I have created this directive in my AppServiceProvider and this is the code <?php namespace AppProviders; use IlluminateSupportServiceProvider; use IlluminatePaginationPaginator; use IlluminateSupportFacadesAuth; use IlluminateSupportFacadesView; use IlluminateSupportFacadesDB; use Blade; class AppServiceProvider extends ServiceProvider { /** * Register any application services. *…

VIEW QUESTION

Display laravel blade in repository pattern

In my Laravel application, I have the following index function in the PostController.php class PostController extends Controller { private PostRepositoryInterface $postRepository; public function __construct(PostRepositoryInterface $postRepository) { $this->postRepository = $postRepository; } /** * Display a listing of the resource. * *…

VIEW QUESTION
Back To Top
Search