/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // $encryptor = app('Illuminate\\Encryption\\Encrypter'); $encryptorToken = $encryptor->encrypt(csrf_token()); $allPosts = job::latest('created_at')->get(); return view('user.index', compact('allPosts', 'encryptorToken')); }