on signup i am checking the invitation code the user uses using:
$match_code = DB::table('codes')->where('code', $code)->pluck('code');
if($code == $match_code){
$ip->save();
$user->save();
Auth::login($user);
return redirect()->route('news');
}else{
return redirect()->route('home')->with('message','Invalid Invite Code');
}
i tried adding this in my view :
@if(isset($message))
<li>{{ $message }}</li>
@endif
but this does not display anything, i am new to laravel. i know this is basics but i have been googling for over 45 mins with no results