Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use IlluminateSupportFacadesValidator;
- use IlluminateHttpRequest;
- use AppUser;
- use IlluminateSupportFacadesDB;
- use AppHttpRequestsPessoaRequest;
- use TymonJWTAuthExceptionsJWTException;
- use TymonJWTAuthFacadesJWTAuth;
- class PessoaController extends Controller
- {
- protected $user;
- public function __construct()
- {
- $this->user = JWTAuth::parseToken()->authenticate();
- }
- }
- (function() {
- app.controller('MemberController', [
- '$scope', '$rootScope', 'AppConfig', '$http',
- function($scope, $rootScope, AppConfig, $http) {
- var vm = this;
- $rootScope.page.title = 'SEC BASE';
- getMembers();
- $rootScope.authenticated = true;
- $scope.token = $rootScope.user.remember_token;
- // Obtem a listagem de todos os usuarios
- function getMembers() {
- $scope.token = $rootScope.user.remember_token;
- Loading.show();
- $http({
- method: 'GET',
- url: AppConfig.ApiUrl + 'members'
- }).then( response => {
- // console.log(response);
- $scope.members = response.data;
- }).finally(Loading.hide);
- }
- ]);
- })();
Add Comment
Please, Sign In to add comment