zachleigh / larafolio

A portfolio management system for Laravel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If project does not exist, BadMethodCallException is thrown

zachleigh opened this issue · comments

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.");
        }

v0.9.9