Skip to content

Commit

Permalink
Fix minor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
marckoxx committed Dec 2, 2023
1 parent 0d577df commit 691bf7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/CatalogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function index(Request $request)
$query->where('name', 'like', '%' . $search . '%');
});
});
})->paginate(9);
})->paginate(10);

return inertia('catalog', [
'motorcycles' => $motorcycles,
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/MotorcycleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function store(Request $request)
'year' => 'required|numeric',
'daily_rate' => 'required|numeric',
'availability' => 'required|boolean',
'image' => 'required|image|mimes:jpeg,png,jpg,gif,webp', // Adjust max size as needed
'image' => 'required|image|mimes:jpeg,png,jpg,gif,webp,avif', // Adjust max size as needed
]);

$imagePath = null;
Expand All @@ -61,7 +61,7 @@ public function store(Request $request)
$image = $request->file('image');
$imageName = $request->model . $request->year . '.' . $image->getClientOriginalExtension();
$image->move(public_path('uploads'), $imageName);
$imagePath = 'uploads/' . $imageName;
$imagePath = 'uploads/' . $imageName; // change during deployment
}

Motorcycles::create([
Expand Down

0 comments on commit 691bf7c

Please sign in to comment.