Advertisement
freddy0512

AuthController.php

Aug 17th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php namespace App\Http\Controllers;
  2.  
  3. use App\Helpers\Logging;
  4. use App\Models\AddressProvinces;
  5. use App\Repository\AgencyRepository;
  6. use App\Services\GatewayService;
  7. use Cartalyst\Sentinel\Checkpoints\NotActivatedException;
  8. use Cartalyst\Sentinel\Checkpoints\ThrottlingException;
  9. use Illuminate\Http\Request;
  10. use Lang;
  11. use Mail;
  12. use Redirect;
  13. use Reminder;
  14. use Sentinel;
  15. use URL;
  16. use Validator;
  17. use View;
  18. use Illuminate\Support\Facades\Input;
  19.  
  20. class AuthController extends JoshController
  21. {
  22. public function postSignin(Request $request)
  23. {
  24. $data = [
  25. "username" => $request->input('email'),
  26. "password" => $request->input('password')
  27. ];
  28.  
  29. $respon=GatewayService::login($data);
  30.  
  31. if ($respon->status == true)
  32. {
  33. return redirect('/');
  34. }
  35. else
  36. {
  37. return redirect()->back()->with('error', $respon->message);
  38. }
  39.  
  40. }
  41.  
  42. }
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement