skip to Main Content

I want to upload product with form to database – Laravel

@extends('master') @section("content") <h1>Upload</h1> <form action="upload" method="POST" enctype="multipart/form-data"> @csrf <div class="form-group"> <label>Name</label> <input type="name" name="name" class="form-control" placeholder="Enter Name"> </div> <div class="form-group"> <label>Price</label> <input type="price" name="price" class="form-control" placeholder="Enter price"> </div> <label>Category</label> <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">…

VIEW QUESTION

How to pass action to Laravel 8 routes?

I was using following Route declaration to pass language action to the routes. Route::get('/de', ['uses' => 'PageController@showHomepage', 'language' => 'de']); And in controller, I was able to get this value like this: $action = $request->route()->getAction(); // $action['language'] gives the given…

VIEW QUESTION
Back To Top
Search