skip to Main Content

Controller does not exist in laravel 5.6

I have this error where it said that the controller does not exist My routes use AppHttpControllersPasienController; Route::resource('/pasien', PasienController::class)->only(['index']); The controller <?php namespace AppHttpControllers; use AppToken; use IlluminateHttpRequest; use IlluminateSupportFacadesHttp; use IlluminateSupportFacadesSession; use IlluminateSupportFacadesValidator; use RealRashidSweetAlertFacadesAlert; class PasienController extends Controller…

VIEW QUESTION

Route in Laravel doesnt work on get Methode

I have tried to create a route with GET methode and doesnt work !!! the route i would like to see on browser bar http://*******:8000/products/categories/index My controller public function index(Request $request) { $categories = Category::where('parent_id', null)->orderby('name', 'asc')->get(); return view('products.categories.allcategories', compact('categories'));…

VIEW QUESTION

form making with using laravel

I need to display this information on a different page by getting 4 different information from the user (for example: name, surname, phone number and email) and I need to do this with laravel <form method="POST" action="/register"> @csrf <label for="name">Name:</label>…

VIEW QUESTION

How to keep current file if the request doesn't have file in laravel?

I have this function that will update the data as showing below: public function update(Request $request, OutstandingPayment $outstandingPayment) { $request->validate([ 'file' => 'required|mimes:jpg,jpeg,png,csv,txt,xlx,xls,pdf|max:2048', 'payment_voucher_file_ref_no' => 'required|string', 'payment_voucher_date' => 'required|string', ]); if ($request->hasFile('file')) { $file_name = time().'_'.$request->file->getClientOriginalName(); $file_path = $request->file('file')->move(public_path('uploads/outstandingPayment'), $file_name);…

VIEW QUESTION
Back To Top
Search