Answers for "resource in laravel 8"

0

laravel resource set status code

use App\User;
use App\Http\Resources\User as UserResource;

Route::get('/user', function () {
    return (new UserResource(User::find(1)))
               ->response()
               ->setStatusCode(200);
});
Posted by: Guest on January-07-2021
0

resource controller laravel

Route::resource('photos', PhotoController::class);
Posted by: Guest on November-04-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language