S
S
SM_ST2022-02-18 13:16:40
Laravel
SM_ST, 2022-02-18 13:16:40

How to catch and change exception in Laravel?

Hello. There is a controller

/**
     * Display the specified resource.
     *
     * @param Category $category
     * @return CategoryResource
     */
    public function show(Category $category): CategoryResource
    {
        return new CategoryResource($category);
    }


if the record is not found, then it gives me like this

620f71f584b30602626427.png

How can I catch it and change it to fit my answer?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question