skip to Main Content

Saving records to database Laravel 10

I'm trying to save the data from the form. However, there is no record when I check the database side. I'm using Laravel 10 and mySQL v5.7. **Controller **store() public function store(Request $request) { $personnelRegistry = null; $personnerlRegistryId = (int)$request->input('personnelRegistryId',…

VIEW QUESTION

Call to a member function manages() on null – Laravel

resources / views / layouts / navigation.blade .php : 8 require in my home page Laravel <!-- resources/views/page.blade.php --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Front Page</title> </head> <body> <!-- Include the navigation menu --> @include('layouts.navigation') <!-- Your front page…

VIEW QUESTION

How can i delete old images in Laravel?

I want to remove old images in my public folder when he want to change him profile photo. ProfileController: if($request->hasFile('image')){ $request->validate([ 'image' => 'image|mimes:jpeg,png,jpg,svg|max:2048' ]); $imageName = $request->user()->id.'-'.time().'.'.$request->image->extension(); $request->image->move(public_path('users'), $imageName); $path = "users/".$imageName; $request->user()->image = $path; $request->user()->save(); } i tried…

VIEW QUESTION
Back To Top
Search