If project does not exist, BadMethodCallException is thrown
zachleigh opened this issue · comments
Zach Leigh commented
https://github.com/zachleigh/larafolio/blob/master/src/Http/Controllers/ProjectController.php#L46
Check for project before calling imagesWithProps(), throw 404 if project doesn't exist. Something like this:
$project = Project::withBlocks($slug)->first();
if (!$project) {
abort(404, "No project with slug {$slug} found.");
}
Zach Leigh commented
v0.9.9