skip to Main Content

Laravel API Call to a member function createToken() on null

AuthController namespace AppHttpControllersApi; use AppHttpControllersController; use AppModelsUser; use AppHttpRequestsApiRegisterRequest; use IlluminateHttpRequest; use IlluminateSupportFacadesAuth; class AuthController extends Controller { public function signUp(RegisterRequest $request) { $data = $request->validated(); $user = User::create($data); Auth::attempt(['username'=>$data['username'], 'password'=>$data['password']]); $token = auth()->user()->createToken($data['username']); return response([ 'status' => 'success', 'username'…

VIEW QUESTION

Filter by category in laravel

Hello I have Laravel project, I want filter menu by products category I have in blade this select form which selects food dish how is it cold,hot or something <div class="form-group"> <label for="">Product Type:</label> <select class="form-control" name="category" id=""> @foreach ($variety…

VIEW QUESTION
Back To Top
Search