Domain\Student\Http\StudentController::store PHP 메소드

store() 공개 메소드

Store new student.
public store ( StoreRequest $request, StudentService $service ) : mixed
$request Domain\Student\Http\Requests\StoreRequest
$service Domain\Student\StudentService
리턴 mixed
    public function store(StoreRequest $request, StudentService $service)
    {
        $save = $service->store($request->all());
        if ($save) {
            return $save;
        }
        return response()->json('Internal error', 500);
    }