Ionic + Laravel


I created an Ionic front-end app following this tutorial:
But now I want to use actual authentication using a mySQL database. He has a tutorial where he uses node.js as backend but I’m only familiar with Laravel for back-end stuff. Is it possible to use Ionic with Laravel? And how? I’m very new to this btw.

Thanks in advance

Here is one to check out.

Also may want to look at the Ionic Custom Auth feature. You could create a simple Authentication script that ties your database to ionic. I am working on this right now, but have a problem I am trying to solve in the script.

Good luck,


Yea I literally just discover ionic cloud. I’m reading throught it now, will post error if I run into any :slight_smile:

If you do not need to store the users on your end, Ionic Auth is the way to go. I need to have other data available and also use login for my website, so I am tryin to get Ionic Custom Auth working. Its giving me a fit though!


Already I’m stuck on this. Everything from the tutorials works but when I put in my own link to a signup page I get a 404…?

EDIT: tried changing it to ui-sref

<ion-view view-title="Sign-In"> <ion-content class="padding"> <div class="list list-inset"> <label class="item item-input"> <input type="text" placeholder="E-mail" ng-model=""> </label> <label class="item item-input"> <input type="password" placeholder="Password" ng-model="data.password"> </label> </div> <button class="button button-block button-positive" ng-click="login(data)">Login</button> <a ui-sref="signup" style="margin-left: 35%">Sign-up here!</a> </ion-content> </ion-view>

`angular.module(‘starter’, [‘ionic’, ‘ngMockE2E’, ‘’])

   .config(function ($stateProvider, $urlRouterProvider, USER_ROLES, $ionicCloudProvider) {
       "core": {
         "app_id": "e91d92e1"
       .state('login', {
         url:         '/login',
         templateUrl: 'templates/login.html',
         controller:  'LoginCtrl'
       .state('signup', {
         url:         '/signup',
         templateUrl: 'templates/signup.html',
         controller:  'SignupCtrl'
       .state('main', {
         url:         '/',
         abstract:    true,
         templateUrl: 'templates/main.html'
       .state('main.dash', {
         url:   'main/dash',
         views: {
           'dash-tab': {
             templateUrl: 'templates/dashboard.html',
             controller:  'DashCtrl'
       .state('main.admin', {
         url:   'main/admin',
         views: {
           'admin-tab': {
             templateUrl: 'templates/admin.html'
         data:  {
           authorizedRoles: [USER_ROLES.admin]
       .state('main.public', {
         url:   'main/public',
         views: {
           'public-tab': {
             templateUrl: 'templates/public.html'

     $urlRouterProvider.otherwise(function ($injector, $location) {
       var $state = $injector.get("$state");

   .run(function ($ionicPlatform) {
     $ionicPlatform.ready(function () {
       if (window.cordova && window.cordova.plugins.Keyboard) {
         // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
         // for form inputs)

         // Don't remove this line unless you know what you are doing. It stops the viewport
         // from snapping when text inputs are focused. Ionic handles this internally for
         // a much nicer keyboard experience.
       if (window.StatusBar) {

   .run(function ($httpBackend) {
                 .respond({message: 'This is my valid response!'});

                 .respond(401, {message: "Not Authenticated"});

                 .respond(403, {message: "Not Authorized"});


   .run(function ($rootScope, $state, AuthService, AUTH_EVENTS) {
     $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) {

       if ('data' in next && 'authorizedRoles' in {
         var authorizedRoles =;
         if (!AuthService.isAuthorized(authorizedRoles)) {
           $state.go($state.current, {}, {reload: true});

       if (!AuthService.isAuthenticated()) {
         if ( !== 'login') {


I click and nothing happens.

EDIT; I just realised that it’s probably because of my authentication. How do I make an exception for the signup page like?