为什么我的重定向在session拿不到重定向的数据呢?
use Illuminate\Support\Facades\DB;
use App\Student;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Session;
use Illuminate\Contracts\Routing\ResponseFactory;
class Student1Controller extends Controller{
public function session3(Request $request){
return Session::get('mess','暂无信息');
//return 'session3';
//return 'session';
}
public function response(){
//return redirect('session3');
return redirect('session3')->with('mess','我是快闪数据');
}
}
为什么第一次访问就是暂无信息呢??