laravel后台登录session验证

List item

加粗样式

~~ ** namespace App\Http\Controllers\Shen;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Session;

class ShenController extends Controller
{
public function show( Request $r){
KaTeX parse error: Expected 'EOF', got '\App' at position 6: data=\̲A̲p̲p̲\Model\logins::…r[‘name’])->where(“pwd”, r [ ′ p w d ′ ] ) − > f i r s t ( ) ; i f ( r['pwd'])->first(); if( r[pwd])>first();if(data){
session::put(“id”,$data[‘id’]);
return view(‘S.index’);
}else{
return view(‘S.show’);
}

}


public function index(){
    return view('S.index');
}

public function logout(){
   session_unset();
   return view('S.show');
}

}

?>

你可能感兴趣的:(php)