├── .buildpacks ├── .codeclimate.yml ├── .editorconfig ├── .env.example ├── .env.travis ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── Procfile ├── README.md ├── angular ├── app │ ├── components │ │ ├── .gitkeep │ │ ├── charts-chartjs │ │ │ ├── charts-chartjs.component.html │ │ │ ├── charts-chartjs.component.js │ │ │ └── charts-chartjs.scss │ │ ├── coming-soon │ │ │ ├── coming-soon.component.html │ │ │ ├── coming-soon.component.js │ │ │ └── coming-soon.scss │ │ ├── dashboard │ │ │ ├── dashboard.component.html │ │ │ ├── dashboard.component.js │ │ │ └── dashboard.scss │ │ ├── forgot-password │ │ │ ├── forgot-password.component.html │ │ │ ├── forgot-password.component.js │ │ │ └── forgot-password.scss │ │ ├── forms-general │ │ │ ├── forms-general.component.html │ │ │ ├── forms-general.component.js │ │ │ └── forms-general.scss │ │ ├── login-form │ │ │ ├── login-form.component.html │ │ │ ├── login-form.component.js │ │ │ └── login-form.scss │ │ ├── login-loader │ │ │ ├── login-loader.component.html │ │ │ └── login-loader.component.js │ │ ├── nav-header │ │ │ ├── nav-header.component.html │ │ │ ├── nav-header.component.js │ │ │ └── nav-header.scss │ │ ├── nav-sidebar │ │ │ ├── nav-sidebar.component.html │ │ │ ├── nav-sidebar.component.js │ │ │ └── nav-sidebar.scss │ │ ├── register-form │ │ │ ├── register-form.component.html │ │ │ ├── register-form.component.js │ │ │ └── register-form.scss │ │ ├── reset-password │ │ │ ├── reset-password.component.html │ │ │ ├── reset-password.component.js │ │ │ └── reset-password.scss │ │ ├── tables-simple │ │ │ ├── tables-simple.component.html │ │ │ ├── tables-simple.component.js │ │ │ └── tables-simple.scss │ │ ├── ui-buttons │ │ │ ├── ui-buttons.component.html │ │ │ ├── ui-buttons.component.js │ │ │ └── ui-buttons.scss │ │ ├── ui-general │ │ │ ├── ui-general.component.html │ │ │ ├── ui-general.component.js │ │ │ └── ui-general.scss │ │ ├── ui-icons │ │ │ ├── ui-icons.component.html │ │ │ ├── ui-icons.component.js │ │ │ └── ui-icons.scss │ │ ├── ui-modal │ │ │ ├── ui-modal.component.html │ │ │ ├── ui-modal.component.js │ │ │ └── ui-modal.scss │ │ ├── ui-timeline │ │ │ ├── ui-timeline.component.html │ │ │ ├── ui-timeline.component.js │ │ │ └── ui-timeline.scss │ │ ├── user-edit │ │ │ ├── user-edit.component.html │ │ │ ├── user-edit.component.js │ │ │ └── user-edit.scss │ │ ├── user-lists │ │ │ ├── user-lists.component.html │ │ │ ├── user-lists.component.js │ │ │ └── user-lists.scss │ │ ├── user-permissions-add │ │ │ ├── user-permissions-add.component.html │ │ │ ├── user-permissions-add.component.js │ │ │ └── user-permissions-add.scss │ │ ├── user-permissions-edit │ │ │ ├── user-permissions-edit.component.html │ │ │ ├── user-permissions-edit.component.js │ │ │ └── user-permissions-edit.scss │ │ ├── user-permissions │ │ │ ├── user-permissions.component.html │ │ │ ├── user-permissions.component.js │ │ │ └── user-permissions.scss │ │ ├── user-profile │ │ │ ├── user-profile.component.html │ │ │ ├── user-profile.component.js │ │ │ └── user-profile.scss │ │ ├── user-roles-add │ │ │ ├── user-roles-add.component.html │ │ │ ├── user-roles-add.component.js │ │ │ └── user-roles-add.scss │ │ ├── user-roles-edit │ │ │ ├── user-roles-edit.component.html │ │ │ ├── user-roles-edit.component.js │ │ │ └── user-roles-edit.scss │ │ ├── user-roles │ │ │ ├── user-roles.component.html │ │ │ ├── user-roles.component.js │ │ │ └── user-roles.scss │ │ ├── user-verification │ │ │ ├── user-verification.component.html │ │ │ ├── user-verification.component.js │ │ │ └── user-verification.scss │ │ └── widgets │ │ │ ├── widgets.component.html │ │ │ ├── widgets.component.js │ │ │ └── widgets.scss │ └── pages │ │ ├── footer │ │ ├── footer.page.html │ │ └── footer.scss │ │ ├── forgot-password │ │ ├── forgot-password.page.html │ │ └── forgot-password.scss │ │ ├── header │ │ ├── header.page.html │ │ └── header.scss │ │ ├── landing │ │ ├── landing.page.html │ │ └── landing.scss │ │ ├── layout │ │ ├── layout.page.html │ │ └── layout.scss │ │ ├── login-loader │ │ ├── login-loader.page.html │ │ └── login.scss │ │ ├── login │ │ ├── login.page.html │ │ └── login.scss │ │ ├── register │ │ ├── register.page.html │ │ └── register.scss │ │ ├── reset-password │ │ ├── reset-password.page.html │ │ └── reset-password.scss │ │ └── user-verification │ │ ├── user-verification.page.html │ │ └── user-verification.scss ├── config │ ├── acl.config.js │ ├── loading_bar.config.js │ ├── routes.config.js │ └── satellizer.config.js ├── dialogs │ └── .gitkeep ├── directives │ ├── password-verify │ │ └── password-verify.component.js │ └── route-bodyclass │ │ └── route-bodyclass.component.js ├── filters │ ├── capitalize.filter.js │ ├── date_millis.filter.js │ ├── human_readable.filter.js │ ├── truncate_characters.filter.js │ ├── truncate_words.filter.js │ ├── trust_html.filter.js │ └── ucfirst.filter.js ├── index.components.js ├── index.config.js ├── index.directives.js ├── index.filters.js ├── index.main.js ├── index.modules.js ├── index.run.js ├── index.services.js ├── material │ ├── page.scss │ ├── project.scss │ ├── toast.scss │ ├── transitions.scss │ └── utilities.scss ├── run │ └── routes.run.js └── services │ ├── API.service.js │ └── context.service.js ├── app.json ├── app ├── Console │ ├── Commands │ │ └── Inspire.php │ └── Kernel.php ├── Events │ └── Event.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── AngularController.php │ │ ├── Auth │ │ │ ├── AuthController.php │ │ │ └── PasswordResetController.php │ │ ├── Controller.php │ │ └── UserController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ └── Request.php │ └── routes.php ├── Jobs │ └── Job.php ├── Listeners │ └── .gitkeep ├── PasswordReset.php ├── Policies │ └── .gitkeep ├── Post.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ ├── ResponseMacroServiceProvider.php │ └── RouteServiceProvider.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── bower.json ├── code_of_conduct.md ├── composer.json ├── composer.lock ├── config ├── api.php ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── compile.php ├── cors.php ├── database.php ├── filesystems.php ├── generators.php ├── jwt.php ├── mail.php ├── queue.php ├── roles.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2015_01_15_105324_create_roles_table.php │ ├── 2015_01_15_114412_create_role_user_table.php │ ├── 2015_01_26_115212_create_permissions_table.php │ ├── 2015_01_26_115523_create_permission_role_table.php │ ├── 2015_02_09_132439_create_permission_user_table.php │ └── 2016_04_11_070428_create_posts_table.php └── seeds │ ├── .gitkeep │ ├── DatabaseSeeder.php │ ├── PermissionRoleTableSeeder.php │ ├── PermissionsTableSeeder.php │ ├── RoleUserTableSeeder.php │ ├── RolesTableSeeder.php │ └── UsersTableSeeder.php ├── elixir.json ├── gulpfile.js ├── karma.conf.js ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── dist │ └── js │ │ └── app.js ├── favicon.ico ├── img │ ├── avatar.png │ ├── avatar04.png │ ├── avatar2.png │ ├── avatar3.png │ ├── avatar5.png │ ├── boxed-bg.jpg │ ├── boxed-bg.png │ ├── cover.jpg │ ├── credit │ │ ├── american-express.png │ │ ├── cirrus.png │ │ ├── mastercard.png │ │ ├── mestro.png │ │ ├── paypal.png │ │ ├── paypal2.png │ │ └── visa.png │ ├── default-50x50.gif │ ├── icons.png │ ├── icons │ │ ├── angular-generators.svg │ │ ├── elixir.svg │ │ ├── folder-byfeature.svg │ │ ├── json-webtoken.svg │ │ ├── logo-grey.svg │ │ ├── logo.svg │ │ └── restful-api.svg │ ├── photo1.png │ ├── photo2.png │ ├── photo3.jpg │ ├── photo4.jpg │ ├── user1-128x128.jpg │ ├── user2-160x160.jpg │ ├── user3-128x128.jpg │ ├── user4-128x128.jpg │ ├── user5-128x128.jpg │ ├── user6-128x128.jpg │ ├── user7-128x128.jpg │ └── user8-128x128.jpg ├── index.php ├── robots.txt └── web.config ├── resources ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── emails │ ├── reset_link.blade.php │ └── userverification.blade.php │ ├── errors │ └── 503.blade.php │ ├── index.blade.php │ ├── unsupported_browser.blade.php │ ├── vendor │ └── .gitkeep │ └── welcome.blade.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tasks ├── angular.task.js ├── bower.task.js ├── concatScripts.task.js ├── ngHtml2Js.task.js └── phpcs.task.js ├── tests ├── AngularGeneratorCommandsTest.php ├── JwtAuthTest.php ├── LaravelRoutesTest.php ├── PasswordResetTest.php ├── TestCase.php └── angular │ ├── app │ └── components │ │ ├── charts-chartjs.component.spec.js │ │ ├── coming-soon.component.spec.js │ │ ├── forgot-password.component.spec.js │ │ ├── forms-general.component.spec.js │ │ ├── login-form │ │ └── login-form.component.spec.js │ │ ├── register-form │ │ └── register-form.component.spec.js │ │ ├── reset-password.component.spec.js │ │ ├── routeCssClassnames.component.spec.js │ │ ├── tables-simple.component.spec.js │ │ ├── ui-buttons.component.spec.js │ │ ├── ui-general.component.spec.js │ │ ├── ui-icons.component.spec.js │ │ ├── ui-modal.component.spec.js │ │ ├── ui-timeline.component.spec.js │ │ ├── user-edit.component.spec.js │ │ ├── user-lists.component.spec.js │ │ ├── user-permissions-add.component.spec.js │ │ ├── user-permissions-edit.component.spec.js │ │ ├── user-permissions.component.spec.js │ │ ├── user-profile.component.spec.js │ │ ├── user-roles-add.component.spec.js │ │ ├── user-roles-edit.component.spec.js │ │ ├── user-roles.component.spec.js │ │ ├── user-verification.component.spec.js │ │ └── widgets.component.spec.js │ ├── config │ └── routes.config.spec.js │ └── services │ ├── .gitkeep │ └── context.service.spec.js ├── webpack.config.js └── wercker.yml /.buildpacks: -------------------------------------------------------------------------------- 1 | https://github.com/heroku/heroku-buildpack-nodejs 2 | https://github.com/heroku/heroku-buildpack-php -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | engines: 2 | eslint: 3 | enabled: true 4 | ratings: 5 | paths: 6 | - angular/** 7 | - "**.js" 8 | languages: 9 | Ruby: false 10 | JavaScript: true 11 | PHP: true 12 | Python: false 13 | exclude_paths: 14 | - "gulpfile.js" 15 | - "public/js/vendor.js" 16 | - "public/dist/js/app.js" 17 | - "tasks/**" 18 | - "tests/**" 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | 15 | [{package.json,bower.json,.jscs.json}] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | 20 | [*.yml] 21 | indent_style = space 22 | indent_size = 2 23 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | 5 | API_PREFIX=api 6 | 7 | DB_HOST=127.0.0.1 8 | DB_DATABASE=homestead 9 | DB_USERNAME=homestead 10 | DB_PASSWORD=secret 11 | 12 | CACHE_DRIVER=file 13 | SESSION_DRIVER=file 14 | QUEUE_DRIVER=sync 15 | 16 | REDIS_HOST=127.0.0.1 17 | REDIS_PASSWORD=null 18 | REDIS_PORT=6379 19 | 20 | MAIL_DRIVER=smtp 21 | MAIL_HOST=mailtrap.io 22 | MAIL_PORT=2525 23 | MAIL_USERNAME=null 24 | MAIL_PASSWORD=null 25 | MAIL_ENCRYPTION=null 26 | MAIL_FROM=no-null 27 | MAIL_FROM_NAME='' 28 | 29 | GITHUB_CLIENT_ID = null 30 | GITHUB_CLIENT_SECRET = null 31 | GITHUB_REDIRECT = http://yourdomain.com/auth/github/callback 32 | 33 | GOOGLE_CLIENT_ID = null 34 | GOOGLE_CLIENT_SECRET = null 35 | GOOGLE_REDIRECT = http://yourdomain.com/auth/google/callback 36 | 37 | FACEBOOK_CLIENT_ID = null 38 | FACEBOOK_CLIENT_SECRET = null 39 | FACEBOOK_REDIRECT = http://yourdomain.com/auth/facebook/callback 40 | -------------------------------------------------------------------------------- /.env.travis: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=someRandomString 4 | 5 | API_PREFIX=api 6 | 7 | DB_HOST=127.0.0.1 8 | DB_DATABASE=laravel_test 9 | DB_USERNAME=travis 10 | DB_PASSWORD= 11 | 12 | CACHE_DRIVER=file 13 | SESSION_DRIVER=file 14 | QUEUE_DRIVER=sync 15 | 16 | REDIS_HOST=127.0.0.1 17 | REDIS_PASSWORD=null 18 | REDIS_PORT=6379 19 | 20 | MAIL_DRIVER=log 21 | MAIL_HOST=mailtrap.io 22 | MAIL_PORT=2525 23 | MAIL_USERNAME=null 24 | MAIL_PASSWORD=null 25 | MAIL_ENCRYPTION=null 26 | 27 | GITHUB_CLIENT_ID = null 28 | GITHUB_CLIENT_SECRET = null 29 | GITHUB_REDIRECT = null 30 | 31 | GOOGLE_CLIENT_ID = null 32 | GOOGLE_CLIENT_SECRET = null 33 | GOOGLE_REDIRECT = null 34 | 35 | FACEBOOK_CLIENT_ID = null 36 | FACEBOOK_CLIENT_SECRET = null 37 | FACEBOOK_REDIRECT = null 38 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint:recommended", 3 | "plugins": ["angular"], 4 | "rules": { 5 | "angular/no-service-method": 0 6 | }, 7 | "env": { 8 | "es6": true, 9 | "browser": true, 10 | "jasmine": true 11 | }, 12 | "ecmaFeatures": { 13 | "modules": true 14 | }, 15 | "globals": { 16 | "angular": true, 17 | "module": true, 18 | "inject": true, 19 | "jQuery": true, 20 | "$": true, 21 | "swal": true, 22 | "ngDescribe": true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.less linguist-vendored 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS generated files 2 | .DS_Store 3 | .DS_Store? 4 | ._* 5 | .Spotlight-V100 6 | .Trashes 7 | ehthumbs.db 8 | Thumbs.db 9 | 10 | # Logs and databases 11 | *.log 12 | *.sql 13 | *.sqlite 14 | 15 | /vendor 16 | /node_modules 17 | Homestead.yaml 18 | Homestead.json 19 | .env 20 | .idea/ 21 | /bower_components 22 | npm-debug.log 23 | public/storage 24 | public/views 25 | public/js 26 | public/fonts 27 | public/css 28 | public/build 29 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | disabled: 2 | - align_double_arrow 3 | 4 | finder: 5 | exclude: 6 | - "app/Console" 7 | - "app/Exceptions" 8 | - "app/Http/Kernel.php" 9 | - "app/Providers" -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.6 5 | - 7.0 6 | - hhvm 7 | 8 | sudo: false 9 | 10 | services: 11 | - mysql 12 | 13 | before_install: 14 | - nvm install 5.1 15 | 16 | before_script: 17 | - mysql -e 'create database laravel_test;' 18 | - export DB_DATABASE=laravel_test 19 | - export DB_USERNAME=travis 20 | - export DB_PASSWORD= 21 | - cp .env.travis .env 22 | - composer self-update 23 | - composer install --no-interaction 24 | - php artisan migrate --force 25 | - php artisan key:generate 26 | - npm install 27 | - bower install 28 | 29 | script: 30 | - vendor/bin/phpunit 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Alex Quiambao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-apache2 public/ 2 | -------------------------------------------------------------------------------- /angular/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/.gitkeep -------------------------------------------------------------------------------- /angular/app/components/charts-chartjs/charts-chartjs.component.js: -------------------------------------------------------------------------------- 1 | class ChartsChartjsController { 2 | constructor () { 3 | 'ngInject' 4 | } 5 | 6 | $onInit () { 7 | this.lineChartLabels = ['Januarys', 'February', 'March', 'April', 'May', 'June', 'July'] 8 | this.lineChartSeries = ['Series A', 'Series B'] 9 | this.lineChartData = [ 10 | [65, 59, 80, 81, 56, 55, 40], 11 | [28, 48, 40, 19, 86, 27, 90] 12 | ] 13 | 14 | this.areaChartLabels = ['Januarys', 'February', 'March', 'April', 'May', 'June', 'July'] 15 | this.areaChartSeries = ['Series A', 'Series B'] 16 | this.areaChartData = [ 17 | [65, 59, 80, 81, 56, 55, 40], 18 | [28, 48, 40, 19, 86, 27, 90] 19 | ] 20 | this.areaChartColours = [ 21 | { 22 | fillColor: '#D2D6DE', 23 | strokeColor: '#D2D6DE', 24 | pointColor: 'rgba(148,159,177,1)', 25 | pointStrokeColor: '#fff', 26 | pointHighlightFill: '#fff', 27 | pointHighlightStroke: 'rgba(148,159,177,0.8)' 28 | }, 29 | { 30 | fillColor: '#4B94C0', 31 | strokeColor: '#4B94C0', 32 | pointColor: '#2980b9', 33 | pointStrokeColor: '#fff', 34 | pointHighlightFill: '#fff', 35 | pointHighlightStroke: 'rgba(77,83,96,1)' 36 | } 37 | ] 38 | 39 | this.onClick = function () {} 40 | 41 | this.barChartLabels = ['Januarys', 'February', 'March', 'April', 'May', 'June', 'July'] 42 | this.barChartSeries = ['Series A', 'Series B'] 43 | this.barChartData = [ 44 | [65, 59, 80, 81, 56, 55, 40], 45 | [28, 48, 40, 19, 86, 27, 90] 46 | ] 47 | this.barChartColours = [ 48 | { 49 | fillColor: '#D2D6DE', 50 | strokeColor: '#D2D6DE', 51 | pointColor: 'rgba(148,159,177,1)', 52 | pointStrokeColor: '#fff', 53 | pointHighlightFill: '#fff', 54 | pointHighlightStroke: 'rgba(148,159,177,0.8)' 55 | }, 56 | { 57 | fillColor: '#00A65A', 58 | strokeColor: '#00A65A', 59 | pointColor: '#2980b9', 60 | pointStrokeColor: '#fff', 61 | pointHighlightFill: '#fff', 62 | pointHighlightStroke: 'rgba(77,83,96,1)' 63 | } 64 | ] 65 | 66 | this.pieLabels = ['Download Sales', 'In-Store Sales', 'Mail-Order Sales'] 67 | this.pieData = [300, 500, 100] 68 | } 69 | } 70 | 71 | export const ChartsChartjsComponent = { 72 | templateUrl: './views/app/components/charts-chartjs/charts-chartjs.component.html', 73 | controller: ChartsChartjsController, 74 | controllerAs: 'vm', 75 | bindings: {} 76 | } 77 | -------------------------------------------------------------------------------- /angular/app/components/charts-chartjs/charts-chartjs.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/charts-chartjs/charts-chartjs.scss -------------------------------------------------------------------------------- /angular/app/components/coming-soon/coming-soon.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 | 9 | 10 |
11 |
12 |
13 |

Coming Soon... (Pull Requests are Welcome)

14 |
15 |
16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /angular/app/components/coming-soon/coming-soon.component.js: -------------------------------------------------------------------------------- 1 | class ComingSoonController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const ComingSoonComponent = { 12 | templateUrl: './views/app/components/coming-soon/coming-soon.component.html', 13 | controller: ComingSoonController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/coming-soon/coming-soon.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/coming-soon/coming-soon.scss -------------------------------------------------------------------------------- /angular/app/components/dashboard/dashboard.component.js: -------------------------------------------------------------------------------- 1 | class DashboardController { 2 | constructor ($scope) { 3 | 'ngInject' 4 | 5 | $scope.labels = ['January', 'February', 'March', 'April', 'May', 'June', 'July'] 6 | $scope.series = ['Series A', 'Series B'] 7 | $scope.data = [ 8 | [65, 59, 80, 81, 56, 55, 40], 9 | [28, 48, 40, 19, 86, 27, 90] 10 | ] 11 | 12 | $scope.onClick = function () {} 13 | 14 | $scope.pieLabels = ['Download Sales', 'In-Store Sales', 'Mail-Order Sales'] 15 | $scope.pieData = [300, 500, 100] 16 | } 17 | } 18 | 19 | export const DashboardComponent = { 20 | templateUrl: './views/app/components/dashboard/dashboard.component.html', 21 | controller: DashboardController, 22 | controllerAs: 'vm', 23 | bindings: {} 24 | } 25 | -------------------------------------------------------------------------------- /angular/app/components/dashboard/dashboard.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/dashboard/dashboard.scss -------------------------------------------------------------------------------- /angular/app/components/forgot-password/forgot-password.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Error:

4 |

Please check your email and try again.

5 |
6 |
7 | 8 | 9 |

This is not a valid email

10 |

Email is required.

11 |

{{ vm.serverError }}

12 |
13 |
14 |
15 | 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /angular/app/components/forgot-password/forgot-password.component.js: -------------------------------------------------------------------------------- 1 | class ForgotPasswordController { 2 | constructor (API, $state) { 3 | 'ngInject' 4 | 5 | this.API = API 6 | this.$state = $state 7 | this.formSubmitted = false 8 | this.serverError = '' 9 | } 10 | 11 | $onInit () { 12 | this.email = '' 13 | } 14 | 15 | submit () { 16 | this.serverError = '' 17 | 18 | this.API.all('auth/password/email').post({ 19 | email: this.email 20 | }).then(() => { 21 | this.$state.go('login', { successMsg: `Please check your email for instructions on how to reset your password.` }) 22 | }, (res) => { 23 | for (var error in res.data.errors) { 24 | this.serverError += res.data.errors[error] + ' ' 25 | } 26 | this.formSubmitted = true 27 | }) 28 | } 29 | } 30 | 31 | export const ForgotPasswordComponent = { 32 | templateUrl: './views/app/components/forgot-password/forgot-password.component.html', 33 | controller: ForgotPasswordController, 34 | controllerAs: 'vm', 35 | bindings: {} 36 | } 37 | -------------------------------------------------------------------------------- /angular/app/components/forgot-password/forgot-password.scss: -------------------------------------------------------------------------------- 1 | .ForgotPassword-input{ 2 | margin-bottom: 0; 3 | } 4 | -------------------------------------------------------------------------------- /angular/app/components/forms-general/forms-general.component.js: -------------------------------------------------------------------------------- 1 | class FormsGeneralController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const FormsGeneralComponent = { 12 | templateUrl: './views/app/components/forms-general/forms-general.component.html', 13 | controller: FormsGeneralController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/forms-general/forms-general.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/forms-general/forms-general.scss -------------------------------------------------------------------------------- /angular/app/components/login-form/login-form.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Login Failed

4 |

{{ vm.loginfailederror }}

5 |
6 |
7 |

Login Failed

8 |

Incorrect Email/Username or Password.

9 |
10 |
11 |

Email Unverified

12 |

Please check your email and click the verification link.

13 |
14 |
15 |

Registration Success!

16 |

A verification link has been sent to your Email Account. Thank You!

17 |
18 |
19 |

Success!

20 |

{{ vm.successMsg }}

21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
31 |
32 | 35 |
36 |
37 |
38 | 50 |
51 |
52 | 55 |
56 |
57 |
58 | Create an account 59 |
60 |
61 |
62 | -------------------------------------------------------------------------------- /angular/app/components/login-form/login-form.component.js: -------------------------------------------------------------------------------- 1 | class LoginFormController { 2 | constructor ($rootScope, $auth, $state, $stateParams, API, AclService) { 3 | 'ngInject' 4 | 5 | delete $rootScope.me 6 | 7 | this.$auth = $auth 8 | this.$state = $state 9 | this.$stateParams = $stateParams 10 | this.AclService = AclService 11 | 12 | this.registerSuccess = $stateParams.registerSuccess 13 | this.successMsg = $stateParams.successMsg 14 | this.loginfailederror = '' 15 | this.loginfailed = false 16 | this.unverified = false 17 | } 18 | 19 | $onInit () { 20 | this.email = '' 21 | this.password = '' 22 | } 23 | 24 | login () { 25 | this.loginfailederror = '' 26 | this.loginfailed = false 27 | this.unverified = false 28 | 29 | let user = { 30 | email: this.email, 31 | password: this.password 32 | } 33 | 34 | this.$auth.login(user) 35 | .then((response) => { 36 | let data = response.data.data 37 | let AclService = this.AclService 38 | 39 | angular.forEach(data.userRole, function (value) { 40 | AclService.attachRole(value) 41 | }) 42 | 43 | AclService.setAbilities(data.abilities) 44 | this.$auth.setToken(response.data) 45 | this.$state.go('app.landing') 46 | }) 47 | .catch(this.failedLogin.bind(this)) 48 | } 49 | 50 | failedLogin (res) { 51 | if (res.status == 401) { 52 | this.loginfailed = true 53 | } else { 54 | if (res.data.errors.message[0] == 'Email Unverified') { 55 | this.unverified = true 56 | } else { 57 | // other kinds of error returned from server 58 | for (var error in res.data.errors) { 59 | this.loginfailederror += res.data.errors[error] + ' ' 60 | } 61 | } 62 | } 63 | } 64 | } 65 | 66 | export const LoginFormComponent = { 67 | templateUrl: './views/app/components/login-form/login-form.component.html', 68 | controller: LoginFormController, 69 | controllerAs: 'vm', 70 | bindings: {} 71 | } 72 | -------------------------------------------------------------------------------- /angular/app/components/login-form/login-form.scss: -------------------------------------------------------------------------------- 1 | .btn-github:hover { 2 | color: #fff 3 | } 4 | 5 | .btn-facebook:hover { 6 | color: #fff 7 | } 8 | 9 | .btn-google:hover { 10 | color: #fff 11 | } -------------------------------------------------------------------------------- /angular/app/components/login-loader/login-loader.component.html: -------------------------------------------------------------------------------- 1 | Logging in... -------------------------------------------------------------------------------- /angular/app/components/login-loader/login-loader.component.js: -------------------------------------------------------------------------------- 1 | class LoginLoaderController { 2 | constructor ($state, $auth, API, AclService) { 3 | 'ngInject' 4 | 5 | API.oneUrl('authenticate').one('user').get().then((response) => { 6 | if (!response.error) { 7 | let data = response.data 8 | 9 | angular.forEach(data.userRole, function (value) { 10 | AclService.attachRole(value) 11 | }) 12 | 13 | AclService.setAbilities(data.abilities) 14 | $auth.setToken(data.token) 15 | $state.go('app.landing') 16 | } 17 | }) 18 | } 19 | } 20 | 21 | export const LoginLoaderComponent = { 22 | templateUrl: './views/app/components/login-loader/login-loader.component.html', 23 | controller: LoginLoaderController, 24 | controllerAs: 'vm', 25 | bindings: {} 26 | } 27 | -------------------------------------------------------------------------------- /angular/app/components/nav-header/nav-header.component.js: -------------------------------------------------------------------------------- 1 | class NavHeaderController { 2 | constructor ($rootScope, ContextService) { 3 | 'ngInject' 4 | 5 | let navHeader = this 6 | 7 | ContextService.me(function (data) { 8 | navHeader.userData = data 9 | }) 10 | } 11 | 12 | $onInit () {} 13 | } 14 | 15 | export const NavHeaderComponent = { 16 | templateUrl: './views/app/components/nav-header/nav-header.component.html', 17 | controller: NavHeaderController, 18 | controllerAs: 'vm', 19 | bindings: {} 20 | } 21 | -------------------------------------------------------------------------------- /angular/app/components/nav-header/nav-header.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/nav-header/nav-header.scss -------------------------------------------------------------------------------- /angular/app/components/nav-sidebar/nav-sidebar.component.js: -------------------------------------------------------------------------------- 1 | class NavSidebarController { 2 | constructor (AclService, ContextService) { 3 | 'ngInject' 4 | 5 | let navSideBar = this 6 | this.can = AclService.can 7 | 8 | ContextService.me(function (data) { 9 | navSideBar.userData = data 10 | }) 11 | } 12 | 13 | $onInit () {} 14 | } 15 | 16 | export const NavSidebarComponent = { 17 | templateUrl: './views/app/components/nav-sidebar/nav-sidebar.component.html', 18 | controller: NavSidebarController, 19 | controllerAs: 'vm', 20 | bindings: {} 21 | } 22 | -------------------------------------------------------------------------------- /angular/app/components/nav-sidebar/nav-sidebar.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/nav-sidebar/nav-sidebar.scss -------------------------------------------------------------------------------- /angular/app/components/register-form/register-form.component.js: -------------------------------------------------------------------------------- 1 | class RegisterFormController { 2 | constructor ($auth, $state, $scope) { 3 | 'ngInject' 4 | 5 | this.$auth = $auth 6 | this.$state = $state 7 | this.$scope = $scope 8 | 9 | this.password = '' 10 | this.password_confirmation = '' 11 | this.formSubmitted = false 12 | this.errors = [] 13 | } 14 | 15 | $onInit () { 16 | this.name = '' 17 | this.email = '' 18 | this.password = '' 19 | this.password_confirmation = '' 20 | } 21 | 22 | register (isValid) { 23 | if (isValid) { 24 | var user = { 25 | name: this.name, 26 | email: this.email, 27 | password: this.password, 28 | password_confirmation: this.password_confirmation 29 | } 30 | 31 | this.$auth.signup(user) 32 | .then(() => { 33 | this.$state.go('login', { registerSuccess: true }) 34 | }) 35 | .catch(this.failedRegistration.bind(this)) 36 | } else { 37 | this.formSubmitted = true 38 | } 39 | } 40 | 41 | failedRegistration (response) { 42 | if (response.status === 422) { 43 | for (var error in response.data.errors) { 44 | this.errors[error] = response.data.errors[error][0] 45 | this.$scope.userForm[error].$invalid = true 46 | } 47 | } 48 | } 49 | } 50 | 51 | export const RegisterFormComponent = { 52 | templateUrl: './views/app/components/register-form/register-form.component.html', 53 | controller: RegisterFormController, 54 | controllerAs: 'vm', 55 | bindings: {} 56 | } 57 | -------------------------------------------------------------------------------- /angular/app/components/register-form/register-form.scss: -------------------------------------------------------------------------------- 1 | .RegisterForm-inputContainer{ 2 | margin-top: 10px; 3 | margin-bottom: 0px; 4 | width: 80%; 5 | min-width: 300px; 6 | } 7 | 8 | .RegisterForm-submit{ 9 | margin-bottom: 40px; 10 | margin-left: 0; 11 | width: 100%; 12 | padding: 5px 0; 13 | } 14 | -------------------------------------------------------------------------------- /angular/app/components/reset-password/reset-password.component.js: -------------------------------------------------------------------------------- 1 | class ResetPasswordController { 2 | constructor (API, $state) { 3 | 'ngInject' 4 | 5 | this.API = API 6 | this.$state = $state 7 | this.alerts = [] 8 | } 9 | 10 | $onInit () { 11 | this.password = '' 12 | this.password_confirmation = '' 13 | this.isValidToken = false 14 | this.formSubmitted = false 15 | 16 | this.verifyToken() 17 | } 18 | 19 | verifyToken () { 20 | let email = this.$state.params.email 21 | let token = this.$state.params.token 22 | 23 | this.API.all('auth/password').get('verify', { 24 | email, token}).then(() => { 25 | this.isValidToken = true 26 | }, () => { 27 | this.$state.go('app.landing') 28 | }) 29 | } 30 | 31 | submit (isValid) { 32 | if (isValid) { 33 | this.alerts = [] 34 | let data = { 35 | email: this.$state.params.email, 36 | token: this.$state.params.token, 37 | password: this.password, 38 | password_confirmation: this.password_confirmation 39 | } 40 | 41 | this.API.all('auth/password/reset').post(data).then(() => { 42 | this.$state.go('login', {successMsg: `Your password has been changed, You may now login.`}) 43 | }, (res) => { 44 | let alrtArr = [] 45 | 46 | angular.forEach(res.data.errors, function (value) { 47 | alrtArr = {type: 'error', 'title': 'Error!', msg: value[0]} 48 | }) 49 | 50 | this.alerts.push(alrtArr) 51 | }) 52 | } else { 53 | this.formSubmitted = true 54 | } 55 | } 56 | } 57 | 58 | export const ResetPasswordComponent = { 59 | templateUrl: './views/app/components/reset-password/reset-password.component.html', 60 | controller: ResetPasswordController, 61 | controllerAs: 'vm', 62 | bindings: {} 63 | } 64 | -------------------------------------------------------------------------------- /angular/app/components/reset-password/reset-password.scss: -------------------------------------------------------------------------------- 1 | .ResetPassword-input{ 2 | margin-bottom: 0; 3 | } 4 | -------------------------------------------------------------------------------- /angular/app/components/tables-simple/tables-simple.component.js: -------------------------------------------------------------------------------- 1 | class TablesSimpleController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const TablesSimpleComponent = { 12 | templateUrl: './views/app/components/tables-simple/tables-simple.component.html', 13 | controller: TablesSimpleController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/tables-simple/tables-simple.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/tables-simple/tables-simple.scss -------------------------------------------------------------------------------- /angular/app/components/ui-buttons/ui-buttons.component.js: -------------------------------------------------------------------------------- 1 | class UiButtonsController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const UiButtonsComponent = { 12 | templateUrl: './views/app/components/ui-buttons/ui-buttons.component.html', 13 | controller: UiButtonsController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/ui-buttons/ui-buttons.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/ui-buttons/ui-buttons.scss -------------------------------------------------------------------------------- /angular/app/components/ui-general/ui-general.component.js: -------------------------------------------------------------------------------- 1 | class UiGeneralController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const UiGeneralComponent = { 12 | templateUrl: './views/app/components/ui-general/ui-general.component.html', 13 | controller: UiGeneralController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/ui-general/ui-general.scss: -------------------------------------------------------------------------------- 1 | .color-palette { 2 | height: 35px; 3 | line-height: 35px; 4 | text-align: center; 5 | } 6 | 7 | .color-palette-set { 8 | margin-bottom: 15px; 9 | } 10 | 11 | .color-palette { 12 | span { 13 | display: none; 14 | font-size: 12px; 15 | } 16 | &:hover span { 17 | display: block; 18 | } 19 | } 20 | 21 | .color-palette-box h4 { 22 | position: absolute; 23 | top: 100%; 24 | left: 25px; 25 | margin-top: -40px; 26 | color: rgba(255, 255, 255, 0.8); 27 | font-size: 12px; 28 | display: block; 29 | z-index: 7; 30 | } -------------------------------------------------------------------------------- /angular/app/components/ui-icons/ui-icons.component.js: -------------------------------------------------------------------------------- 1 | class UiIconsController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const UiIconsComponent = { 12 | templateUrl: './views/app/components/ui-icons/ui-icons.component.html', 13 | controller: UiIconsController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/ui-icons/ui-icons.scss: -------------------------------------------------------------------------------- 1 | .bs-glyphicons { 2 | padding-left: 0; 3 | padding-bottom: 1px; 4 | margin-bottom: 20px; 5 | list-style: none; 6 | overflow: hidden; 7 | li { 8 | float: left; 9 | width: 25%; 10 | height: 115px; 11 | padding: 10px; 12 | margin: 0 -1px -1px 0; 13 | font-size: 12px; 14 | line-height: 1.4; 15 | text-align: center; 16 | border: 1px solid #ddd; 17 | } 18 | .glyphicon { 19 | margin-top: 5px; 20 | margin-bottom: 10px; 21 | font-size: 24px; 22 | } 23 | .glyphicon-class { 24 | display: block; 25 | text-align: center; 26 | word-wrap: break-word; 27 | /* Help out IE10+ with class names */ 28 | } 29 | li:hover { 30 | background-color: rgba(86, 61, 124, 0.1); 31 | } 32 | } 33 | 34 | @media (min-width: 768px) { 35 | .bs-glyphicons li { 36 | width: 12.5%; 37 | } 38 | } -------------------------------------------------------------------------------- /angular/app/components/ui-modal/ui-modal.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/ui-modal/ui-modal.scss -------------------------------------------------------------------------------- /angular/app/components/ui-timeline/ui-timeline.component.js: -------------------------------------------------------------------------------- 1 | class UiTimelineController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const UiTimelineComponent = { 12 | templateUrl: './views/app/components/ui-timeline/ui-timeline.component.html', 13 | controller: UiTimelineController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/ui-timeline/ui-timeline.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/ui-timeline/ui-timeline.scss -------------------------------------------------------------------------------- /angular/app/components/user-edit/user-edit.component.js: -------------------------------------------------------------------------------- 1 | class UserEditController { 2 | constructor ($stateParams, $state, API) { 3 | 'ngInject' 4 | 5 | this.$state = $state 6 | this.formSubmitted = false 7 | this.alerts = [] 8 | this.userRolesSelected = [] 9 | 10 | if ($stateParams.alerts) { 11 | this.alerts.push($stateParams.alerts) 12 | } 13 | 14 | let userId = $stateParams.userId 15 | 16 | let Roles = API.service('roles', API.all('users')) 17 | Roles.getList() 18 | .then((response) => { 19 | let systemRoles = [] 20 | let roleResponse = response.plain() 21 | 22 | angular.forEach(roleResponse, function (value) { 23 | systemRoles.push({id: value.id, name: value.name}) 24 | }) 25 | 26 | this.systemRoles = systemRoles 27 | }) 28 | 29 | let UserData = API.service('show', API.all('users')) 30 | UserData.one(userId).get() 31 | .then((response) => { 32 | let userRole = [] 33 | let userResponse = response.plain() 34 | 35 | angular.forEach(userResponse.data.role, function (value) { 36 | userRole.push(value.id) 37 | }) 38 | 39 | response.data.role = userRole 40 | this.usereditdata = API.copy(response) 41 | }) 42 | } 43 | 44 | save (isValid) { 45 | if (isValid) { 46 | let $state = this.$state 47 | this.usereditdata.put() 48 | .then(() => { 49 | let alert = { type: 'success', 'title': 'Success!', msg: 'User has been updated.' } 50 | $state.go($state.current, { alerts: alert}) 51 | }, (response) => { 52 | let alert = { type: 'error', 'title': 'Error!', msg: response.data.message } 53 | $state.go($state.current, { alerts: alert}) 54 | }) 55 | } else { 56 | this.formSubmitted = true 57 | } 58 | } 59 | 60 | $onInit () {} 61 | } 62 | 63 | export const UserEditComponent = { 64 | templateUrl: './views/app/components/user-edit/user-edit.component.html', 65 | controller: UserEditController, 66 | controllerAs: 'vm', 67 | bindings: {} 68 | } 69 | -------------------------------------------------------------------------------- /angular/app/components/user-edit/user-edit.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-edit/user-edit.scss -------------------------------------------------------------------------------- /angular/app/components/user-lists/user-lists.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Users Module description here

3 | 7 |
8 |
9 |
10 |
11 |
12 |
13 |

User List

14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /angular/app/components/user-lists/user-lists.component.js: -------------------------------------------------------------------------------- 1 | class UserListsController { 2 | constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) { 3 | 'ngInject' 4 | this.API = API 5 | this.$state = $state 6 | 7 | let Users = this.API.service('users') 8 | 9 | Users.getList() 10 | .then((response) => { 11 | let dataSet = response.plain() 12 | 13 | this.dtOptions = DTOptionsBuilder.newOptions() 14 | .withOption('data', dataSet) 15 | .withOption('createdRow', createdRow) 16 | .withOption('responsive', true) 17 | .withBootstrap() 18 | 19 | this.dtColumns = [ 20 | DTColumnBuilder.newColumn('id').withTitle('ID'), 21 | DTColumnBuilder.newColumn('name').withTitle('Name'), 22 | DTColumnBuilder.newColumn('email').withTitle('Email'), 23 | DTColumnBuilder.newColumn(null).withTitle('Actions').notSortable() 24 | .renderWith(actionsHtml) 25 | ] 26 | 27 | this.displayTable = true 28 | }) 29 | 30 | let createdRow = (row) => { 31 | $compile(angular.element(row).contents())($scope) 32 | } 33 | 34 | let actionsHtml = (data) => { 35 | return ` 36 | 37 | 38 | 39 |   40 | ` 43 | } 44 | } 45 | 46 | delete (userId) { 47 | let API = this.API 48 | let $state = this.$state 49 | 50 | swal({ 51 | title: 'Are you sure?', 52 | text: 'You will not be able to recover this data!', 53 | type: 'warning', 54 | showCancelButton: true, 55 | confirmButtonColor: '#DD6B55', 56 | confirmButtonText: 'Yes, delete it!', 57 | closeOnConfirm: false, 58 | showLoaderOnConfirm: true, 59 | html: false 60 | }, function () { 61 | API.one('users').one('user', userId).remove() 62 | .then(() => { 63 | swal({ 64 | title: 'Deleted!', 65 | text: 'User Permission has been deleted.', 66 | type: 'success', 67 | confirmButtonText: 'OK', 68 | closeOnConfirm: true 69 | }, function () { 70 | $state.reload() 71 | }) 72 | }) 73 | }) 74 | } 75 | 76 | $onInit () {} 77 | } 78 | 79 | export const UserListsComponent = { 80 | templateUrl: './views/app/components/user-lists/user-lists.component.html', 81 | controller: UserListsController, 82 | controllerAs: 'vm', 83 | bindings: {} 84 | } 85 | -------------------------------------------------------------------------------- /angular/app/components/user-lists/user-lists.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-lists/user-lists.scss -------------------------------------------------------------------------------- /angular/app/components/user-permissions-add/user-permissions-add.component.js: -------------------------------------------------------------------------------- 1 | class UserPermissionsAddController { 2 | constructor (API, $state, $stateParams) { 3 | 'ngInject' 4 | 5 | this.$state = $state 6 | this.formSubmitted = false 7 | this.API = API 8 | this.alerts = [] 9 | 10 | if ($stateParams.alerts) { 11 | this.alerts.push($stateParams.alerts) 12 | } 13 | } 14 | 15 | save (isValid) { 16 | this.$state.go(this.$state.current, {}, { alerts: 'test' }) 17 | if (isValid) { 18 | let Permissions = this.API.service('permissions', this.API.all('users')) 19 | let $state = this.$state 20 | 21 | Permissions.post({ 22 | 'name': this.name, 23 | 'slug': this.slug, 24 | 'description': this.description 25 | }).then(function () { 26 | let alert = { type: 'success', 'title': 'Success!', msg: 'Permission has been added.' } 27 | $state.go($state.current, { alerts: alert}) 28 | }, function (response) { 29 | let alert = { type: 'error', 'title': 'Error!', msg: response.data.message } 30 | $state.go($state.current, { alerts: alert}) 31 | }) 32 | } else { 33 | this.formSubmitted = true 34 | } 35 | } 36 | 37 | $onInit () {} 38 | } 39 | 40 | export const UserPermissionsAddComponent = { 41 | templateUrl: './views/app/components/user-permissions-add/user-permissions-add.component.html', 42 | controller: UserPermissionsAddController, 43 | controllerAs: 'vm', 44 | bindings: {} 45 | } 46 | -------------------------------------------------------------------------------- /angular/app/components/user-permissions-add/user-permissions-add.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-permissions-add/user-permissions-add.scss -------------------------------------------------------------------------------- /angular/app/components/user-permissions-edit/user-permissions-edit.component.js: -------------------------------------------------------------------------------- 1 | class UserPermissionsEditController { 2 | constructor ($stateParams, $state, API) { 3 | 'ngInject' 4 | 5 | this.$state = $state 6 | this.formSubmitted = false 7 | this.alerts = [] 8 | 9 | if ($stateParams.alerts) { 10 | this.alerts.push($stateParams.alerts) 11 | } 12 | 13 | let permissionId = $stateParams.permissionId 14 | let Permission = API.service('permissions-show', API.all('users')) 15 | Permission.one(permissionId).get() 16 | .then((response) => { 17 | this.permission = API.copy(response) 18 | }) 19 | } 20 | 21 | save (isValid) { 22 | if (isValid) { 23 | let $state = this.$state 24 | this.permission.put() 25 | .then(() => { 26 | let alert = { type: 'success', 'title': 'Success!', msg: 'Permission has been updated.' } 27 | $state.go($state.current, { alerts: alert}) 28 | }, (response) => { 29 | let alert = { type: 'error', 'title': 'Error!', msg: response.data.message } 30 | $state.go($state.current, { alerts: alert}) 31 | }) 32 | } else { 33 | this.formSubmitted = true 34 | } 35 | } 36 | 37 | $onInit () {} 38 | } 39 | 40 | export const UserPermissionsEditComponent = { 41 | templateUrl: './views/app/components/user-permissions-edit/user-permissions-edit.component.html', 42 | controller: UserPermissionsEditController, 43 | controllerAs: 'vm', 44 | bindings: {} 45 | } 46 | -------------------------------------------------------------------------------- /angular/app/components/user-permissions-edit/user-permissions-edit.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-permissions-edit/user-permissions-edit.scss -------------------------------------------------------------------------------- /angular/app/components/user-permissions/user-permissions.component.html: -------------------------------------------------------------------------------- 1 |
2 |

User Permissions Module description here

3 | 7 |
8 |
9 |
10 |
11 |

Permission Lists

12 |
13 | Add New 14 |
15 |
16 |
17 |
18 |
19 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /angular/app/components/user-permissions/user-permissions.component.js: -------------------------------------------------------------------------------- 1 | class UserPermissionsController { 2 | constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) { 3 | 'ngInject' 4 | this.API = API 5 | this.$state = $state 6 | 7 | let Permissions = this.API.service('permissions', this.API.all('users')) 8 | 9 | Permissions.getList() 10 | .then((response) => { 11 | let dataSet = response.plain() 12 | 13 | this.dtOptions = DTOptionsBuilder.newOptions() 14 | .withOption('data', dataSet) 15 | .withOption('createdRow', createdRow) 16 | .withOption('responsive', true) 17 | .withBootstrap() 18 | 19 | this.dtColumns = [ 20 | DTColumnBuilder.newColumn('id').withTitle('ID'), 21 | DTColumnBuilder.newColumn('name').withTitle('Name'), 22 | DTColumnBuilder.newColumn('slug').withTitle('Slug'), 23 | DTColumnBuilder.newColumn(null).withTitle('Actions').notSortable() 24 | .renderWith(actionsHtml) 25 | ] 26 | 27 | this.displayTable = true 28 | }) 29 | 30 | let createdRow = (row) => { 31 | $compile(angular.element(row).contents())($scope) 32 | } 33 | 34 | let actionsHtml = (data) => { 35 | return ` 36 | 37 | 38 | 39 |   40 | ` 43 | } 44 | } 45 | 46 | delete (permissionId) { 47 | let API = this.API 48 | let $state = this.$state 49 | 50 | swal({ 51 | title: 'Are you sure?', 52 | text: 'You will not be able to recover this data!', 53 | type: 'warning', 54 | showCancelButton: true, 55 | confirmButtonColor: '#DD6B55', 56 | confirmButtonText: 'Yes, delete it!', 57 | closeOnConfirm: false, 58 | showLoaderOnConfirm: true, 59 | html: false 60 | }, function () { 61 | API.one('users').one('permissions', permissionId).remove() 62 | .then(() => { 63 | swal({ 64 | title: 'Deleted!', 65 | text: 'User Permission has been deleted.', 66 | type: 'success', 67 | confirmButtonText: 'OK', 68 | closeOnConfirm: true 69 | }, function () { 70 | $state.reload() 71 | }) 72 | }) 73 | }) 74 | } 75 | 76 | $onInit () {} 77 | } 78 | 79 | export const UserPermissionsComponent = { 80 | templateUrl: './views/app/components/user-permissions/user-permissions.component.html', 81 | controller: UserPermissionsController, 82 | controllerAs: 'vm', 83 | bindings: {} 84 | } 85 | -------------------------------------------------------------------------------- /angular/app/components/user-permissions/user-permissions.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-permissions/user-permissions.scss -------------------------------------------------------------------------------- /angular/app/components/user-profile/user-profile.component.js: -------------------------------------------------------------------------------- 1 | class UserProfileController { 2 | constructor ($stateParams, $state, API) { 3 | 'ngInject' 4 | 5 | this.$state = $state 6 | this.formSubmitted = false 7 | this.alerts = [] 8 | this.userRolesSelected = [] 9 | 10 | if ($stateParams.alerts) { 11 | this.alerts.push($stateParams.alerts) 12 | } 13 | 14 | let UserData = API.service('me', API.all('users')) 15 | UserData.one().get() 16 | .then((response) => { 17 | this.userdata = API.copy(response) 18 | this.userdata.data.current_password = '' 19 | this.userdata.data.new_password = '' 20 | this.userdata.data.new_password_confirmation = '' 21 | }) 22 | } 23 | 24 | save (isValid, userForm) { 25 | if (isValid) { 26 | let $state = this.$state 27 | 28 | this.userdata.put() 29 | .then(() => { 30 | let alert = { type: 'success', 'title': 'Success!', msg: 'Profile has been updated.' } 31 | $state.go($state.current, { alerts: alert}) 32 | }, (response) => { 33 | let formErrors = [] 34 | 35 | if (angular.isDefined(response.data.errors.message)) { 36 | formErrors = response.data.errors.message[0] 37 | } else { 38 | formErrors = response.data.errors 39 | } 40 | 41 | angular.forEach(formErrors, function (value, key) { 42 | let varkey = key.replace('data.', '') 43 | userForm[varkey].$invalid = true 44 | userForm[varkey].customError = value[0] 45 | }) 46 | 47 | this.formSubmitted = true 48 | }) 49 | } else { 50 | this.formSubmitted = true 51 | } 52 | } 53 | 54 | $onInit () {} 55 | } 56 | 57 | export const UserProfileComponent = { 58 | templateUrl: './views/app/components/user-profile/user-profile.component.html', 59 | controller: UserProfileController, 60 | controllerAs: 'vm', 61 | bindings: {} 62 | } 63 | -------------------------------------------------------------------------------- /angular/app/components/user-profile/user-profile.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-profile/user-profile.scss -------------------------------------------------------------------------------- /angular/app/components/user-roles-add/user-roles-add.component.js: -------------------------------------------------------------------------------- 1 | class UserRolesAddController { 2 | constructor (API, $state, $stateParams) { 3 | 'ngInject' 4 | 5 | this.$state = $state 6 | this.formSubmitted = false 7 | this.API = API 8 | this.alerts = [] 9 | 10 | if ($stateParams.alerts) { 11 | this.alerts.push($stateParams.alerts) 12 | } 13 | } 14 | 15 | save (isValid) { 16 | this.$state.go(this.$state.current, {}, { alerts: 'test' }) 17 | if (isValid) { 18 | let Roles = this.API.service('roles', this.API.all('users')) 19 | let $state = this.$state 20 | 21 | Roles.post({ 22 | 'role': this.role, 23 | 'slug': this.slug, 24 | 'description': this.description 25 | }).then(function () { 26 | let alert = { type: 'success', 'title': 'Success!', msg: 'Role has been added.' } 27 | $state.go($state.current, { alerts: alert}) 28 | }, function (response) { 29 | let alert = { type: 'error', 'title': 'Error!', msg: response.data.message } 30 | $state.go($state.current, { alerts: alert}) 31 | }) 32 | } else { 33 | this.formSubmitted = true 34 | } 35 | } 36 | 37 | $onInit () {} 38 | } 39 | 40 | export const UserRolesAddComponent = { 41 | templateUrl: './views/app/components/user-roles-add/user-roles-add.component.html', 42 | controller: UserRolesAddController, 43 | controllerAs: 'vm', 44 | bindings: {} 45 | } 46 | -------------------------------------------------------------------------------- /angular/app/components/user-roles-add/user-roles-add.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-roles-add/user-roles-add.scss -------------------------------------------------------------------------------- /angular/app/components/user-roles-edit/user-roles-edit.component.js: -------------------------------------------------------------------------------- 1 | class UserRolesEditController { 2 | constructor ($stateParams, $state, API) { 3 | 'ngInject' 4 | 5 | this.$state = $state 6 | this.formSubmitted = false 7 | this.alerts = [] 8 | 9 | if ($stateParams.alerts) { 10 | this.alerts.push($stateParams.alerts) 11 | } 12 | 13 | let Permissions = API.service('permissions', API.all('users')) 14 | 15 | Permissions.getList() 16 | .then((response) => { 17 | let permissionList = [] 18 | let permissionResponse = response.plain() 19 | 20 | angular.forEach(permissionResponse, function (value) { 21 | permissionList.push({id: value.id, name: value.name}) 22 | }) 23 | 24 | this.systemPermissions = permissionList 25 | }) 26 | 27 | let roleId = $stateParams.roleId 28 | let Role = API.service('roles-show', API.all('users')) 29 | Role.one(roleId).get() 30 | .then((response) => { 31 | let rolePermissions = [] 32 | 33 | angular.forEach(response.data.permissions, function (value) { 34 | rolePermissions.push(value.id) 35 | }) 36 | 37 | response.data.permissions = rolePermissions 38 | 39 | this.role = API.copy(response) 40 | }) 41 | } 42 | 43 | save (isValid) { 44 | if (isValid) { 45 | let $state = this.$state 46 | this.role.put() 47 | .then(() => { 48 | let alert = { type: 'success', 'title': 'Success!', msg: 'Role has been updated.' } 49 | $state.go($state.current, { alerts: alert}) 50 | }, (response) => { 51 | let alert = { type: 'error', 'title': 'Error!', msg: response.data.message } 52 | $state.go($state.current, { alerts: alert}) 53 | }) 54 | } else { 55 | this.formSubmitted = true 56 | } 57 | } 58 | 59 | $onInit () {} 60 | } 61 | 62 | export const UserRolesEditComponent = { 63 | templateUrl: './views/app/components/user-roles-edit/user-roles-edit.component.html', 64 | controller: UserRolesEditController, 65 | controllerAs: 'vm', 66 | bindings: {} 67 | } 68 | -------------------------------------------------------------------------------- /angular/app/components/user-roles-edit/user-roles-edit.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-roles-edit/user-roles-edit.scss -------------------------------------------------------------------------------- /angular/app/components/user-roles/user-roles.component.html: -------------------------------------------------------------------------------- 1 |
2 |

User Roles Module description here

3 | 7 |
8 |
9 |
10 |
11 |

Role List

12 |
13 | Add New 14 |
15 |
16 |
17 |
18 |
19 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /angular/app/components/user-roles/user-roles.component.js: -------------------------------------------------------------------------------- 1 | class UserRolesController { 2 | constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) { 3 | 'ngInject' 4 | this.API = API 5 | this.$state = $state 6 | 7 | let Roles = this.API.service('roles', this.API.all('users')) 8 | 9 | Roles.getList() 10 | .then((response) => { 11 | let dataSet = response.plain() 12 | 13 | this.dtOptions = DTOptionsBuilder.newOptions() 14 | .withOption('data', dataSet) 15 | .withOption('createdRow', createdRow) 16 | .withOption('responsive', true) 17 | .withBootstrap() 18 | 19 | this.dtColumns = [ 20 | DTColumnBuilder.newColumn('id').withTitle('ID'), 21 | DTColumnBuilder.newColumn('name').withTitle('Name'), 22 | DTColumnBuilder.newColumn('slug').withTitle('Slug'), 23 | DTColumnBuilder.newColumn(null).withTitle('Actions').notSortable() 24 | .renderWith(actionsHtml) 25 | ] 26 | 27 | this.displayTable = true 28 | }) 29 | 30 | let createdRow = (row) => { 31 | $compile(angular.element(row).contents())($scope) 32 | } 33 | 34 | let actionsHtml = (data) => { 35 | return ` 36 | 37 | 38 | 39 |   40 | ` 43 | } 44 | } 45 | 46 | delete (roleId) { 47 | let API = this.API 48 | let $state = this.$state 49 | 50 | swal({ 51 | title: 'Are you sure?', 52 | text: 'You will not be able to recover this data!', 53 | type: 'warning', 54 | showCancelButton: true, 55 | confirmButtonColor: '#DD6B55', 56 | confirmButtonText: 'Yes, delete it!', 57 | closeOnConfirm: false, 58 | showLoaderOnConfirm: true, 59 | html: false 60 | }, function () { 61 | API.one('users').one('roles', roleId).remove() 62 | .then(() => { 63 | swal({ 64 | title: 'Deleted!', 65 | text: 'User Role has been deleted.', 66 | type: 'success', 67 | confirmButtonText: 'OK', 68 | closeOnConfirm: true 69 | }, function () { 70 | $state.reload() 71 | }) 72 | }) 73 | }) 74 | } 75 | 76 | $onInit () {} 77 | } 78 | 79 | export const UserRolesComponent = { 80 | templateUrl: './views/app/components/user-roles/user-roles.component.html', 81 | controller: UserRolesController, 82 | controllerAs: 'vm', 83 | bindings: {} 84 | } 85 | -------------------------------------------------------------------------------- /angular/app/components/user-roles/user-roles.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-roles/user-roles.scss -------------------------------------------------------------------------------- /angular/app/components/user-verification/user-verification.component.html: -------------------------------------------------------------------------------- 1 |
2 |

{{alert.title}}

3 |

{{alert.msg}}

4 |
5 | Login Page 6 | -------------------------------------------------------------------------------- /angular/app/components/user-verification/user-verification.component.js: -------------------------------------------------------------------------------- 1 | class UserVerificationController { 2 | constructor ($stateParams) { 3 | 'ngInject' 4 | this.alerts = [] 5 | 6 | if ($stateParams.status === 'success') { 7 | this.alerts.push({ type: 'success', 'title': 'Success!', msg: 'Email Verification Success.' }) 8 | } else { 9 | this.alerts.push({ type: 'danger', 'title': 'Error:', msg: 'Email verification failed.' }) 10 | } 11 | } 12 | 13 | $onInit () {} 14 | } 15 | 16 | export const UserVerificationComponent = { 17 | templateUrl: './views/app/components/user-verification/user-verification.component.html', 18 | controller: UserVerificationController, 19 | controllerAs: 'vm', 20 | bindings: {} 21 | } 22 | -------------------------------------------------------------------------------- /angular/app/components/user-verification/user-verification.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/user-verification/user-verification.scss -------------------------------------------------------------------------------- /angular/app/components/widgets/widgets.component.js: -------------------------------------------------------------------------------- 1 | class WidgetsController { 2 | constructor () { 3 | 'ngInject' 4 | 5 | // 6 | } 7 | 8 | $onInit () {} 9 | } 10 | 11 | export const WidgetsComponent = { 12 | templateUrl: './views/app/components/widgets/widgets.component.html', 13 | controller: WidgetsController, 14 | controllerAs: 'vm', 15 | bindings: {} 16 | } 17 | -------------------------------------------------------------------------------- /angular/app/components/widgets/widgets.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/components/widgets/widgets.scss -------------------------------------------------------------------------------- /angular/app/pages/footer/footer.page.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /angular/app/pages/footer/footer.scss: -------------------------------------------------------------------------------- 1 | @import "./angular/material/project"; 2 | 3 | .Footer{ 4 | text-align: center; 5 | background-color: $background; 6 | border-top: 1px solid $border; 7 | padding-top: 40px; 8 | padding-bottom: 40px; 9 | color: $grey; 10 | font-weight: 300; 11 | } 12 | 13 | .Footer-text{ 14 | padding-top: 10px; 15 | opacity: 0.8; 16 | color: $grey; 17 | } 18 | 19 | .Footer-link{ 20 | text-decoration: none; 21 | color: $grey !important; 22 | font-weight: 400; 23 | } 24 | 25 | .Footer-link:hover{ 26 | text-decoration: underline; 27 | } 28 | 29 | .Footer-logo{ 30 | width: 49px; 31 | height: 46px; 32 | } 33 | -------------------------------------------------------------------------------- /angular/app/pages/forgot-password/forgot-password.page.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 25 |
26 | -------------------------------------------------------------------------------- /angular/app/pages/forgot-password/forgot-password.scss: -------------------------------------------------------------------------------- 1 | .ForgotPassword-formContainer{ 2 | margin-top: 80px; 3 | margin-bottom: 80px; 4 | } 5 | -------------------------------------------------------------------------------- /angular/app/pages/header/header.page.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /angular/app/pages/header/header.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/app/pages/header/header.scss -------------------------------------------------------------------------------- /angular/app/pages/landing/landing.page.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | Dashboard 4 | Version 2.0 5 |

6 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /angular/app/pages/layout/layout.page.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
-------------------------------------------------------------------------------- /angular/app/pages/layout/layout.scss: -------------------------------------------------------------------------------- 1 | .dataTables_filter { 2 | float: right 3 | } 4 | 5 | .dataTables_filter input { 6 | margin: 0px 5px 0px 5px; 7 | } 8 | 9 | .dataTables_paginate { 10 | float: right 11 | } 12 | 13 | .dataTables_paginate .pagination { 14 | margin: 0px 15 | } -------------------------------------------------------------------------------- /angular/app/pages/login-loader/login-loader.page.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 8 |
9 | -------------------------------------------------------------------------------- /angular/app/pages/login-loader/login.scss: -------------------------------------------------------------------------------- 1 | // .Login-formContainer{ 2 | // margin-top: 80px; 3 | // margin-bottom: 80px; 4 | // } 5 | -------------------------------------------------------------------------------- /angular/app/pages/login/login.page.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 19 |
20 | -------------------------------------------------------------------------------- /angular/app/pages/login/login.scss: -------------------------------------------------------------------------------- 1 | .Login-formContainer{ 2 | margin-top: 80px; 3 | margin-bottom: 80px; 4 | } 5 | -------------------------------------------------------------------------------- /angular/app/pages/register/register.page.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
7 |
8 |
9 |

Create a new account

10 |
11 |
12 |
13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 |
21 | 24 |
25 |
26 |
27 |
28 |
29 | By signing up, you agree to our Terms and that you have read our Privacy Policy. 30 |
31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /angular/app/pages/register/register.scss: -------------------------------------------------------------------------------- 1 | .Register-formContainer{ 2 | margin-top: 80px; 3 | margin-bottom: 80px; 4 | } 5 | -------------------------------------------------------------------------------- /angular/app/pages/reset-password/reset-password.page.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 19 |
20 | -------------------------------------------------------------------------------- /angular/app/pages/reset-password/reset-password.scss: -------------------------------------------------------------------------------- 1 | .ResetPassword-formContainer{ 2 | margin-top: 80px; 3 | margin-bottom: 80px; 4 | } 5 | -------------------------------------------------------------------------------- /angular/app/pages/user-verification/user-verification.page.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 8 |
9 | -------------------------------------------------------------------------------- /angular/app/pages/user-verification/user-verification.scss: -------------------------------------------------------------------------------- 1 | .Login-formContainer{ 2 | margin-top: 80px; 3 | margin-bottom: 80px; 4 | } 5 | -------------------------------------------------------------------------------- /angular/config/acl.config.js: -------------------------------------------------------------------------------- 1 | export function AclConfig (AclServiceProvider) { 2 | 'ngInject' 3 | 4 | var myConfig = { 5 | storage: 'localStorage', 6 | storageKey: 'AppAcl' 7 | } 8 | 9 | /*eslint-disable */ 10 | AclServiceProvider.config(myConfig) 11 | /*eslint-enable */ 12 | } 13 | -------------------------------------------------------------------------------- /angular/config/loading_bar.config.js: -------------------------------------------------------------------------------- 1 | export function LoadingBarConfig (cfpLoadingBarProvider) { 2 | 'ngInject' 3 | cfpLoadingBarProvider.includeSpinner = true 4 | } 5 | -------------------------------------------------------------------------------- /angular/config/satellizer.config.js: -------------------------------------------------------------------------------- 1 | export function SatellizerConfig ($authProvider) { 2 | 'ngInject' 3 | 4 | $authProvider.httpInterceptor = function () { 5 | return true 6 | } 7 | 8 | $authProvider.loginUrl = '/api/auth/login' 9 | $authProvider.signupUrl = '/api/auth/register' 10 | $authProvider.tokenRoot = 'data' // compensates success response macro 11 | } 12 | -------------------------------------------------------------------------------- /angular/dialogs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/angular/dialogs/.gitkeep -------------------------------------------------------------------------------- /angular/directives/password-verify/password-verify.component.js: -------------------------------------------------------------------------------- 1 | function passwordVerifyClass () { 2 | return { 3 | require: 'ngModel', 4 | scope: { 5 | passwordVerify: '=' 6 | }, 7 | link: function (scope, element, attrs, ctrl) { 8 | scope.$watch(function () { 9 | var combined 10 | 11 | if (scope.passwordVerify || ctrl.$viewValue) { 12 | combined = scope.passwordVerify + '_' + ctrl.$viewValue 13 | } 14 | 15 | return combined 16 | }, function (value) { 17 | if (value) { 18 | ctrl.$parsers.unshift(function (viewValue) { 19 | var origin = scope.passwordVerify 20 | 21 | if (origin !== viewValue) { 22 | ctrl.$setValidity('passwordVerify', false) 23 | return undefined 24 | } else { 25 | ctrl.$setValidity('passwordVerify', true) 26 | return viewValue 27 | } 28 | }) 29 | } 30 | }) 31 | } 32 | } 33 | } 34 | 35 | export const PasswordVerifyClassComponent = passwordVerifyClass 36 | -------------------------------------------------------------------------------- /angular/directives/route-bodyclass/route-bodyclass.component.js: -------------------------------------------------------------------------------- 1 | routeBodyClass.$inject = ['$rootScope'] 2 | function routeBodyClass ($rootScope) { 3 | return { 4 | scope: {ngModel: '=ngModel'}, 5 | link: function routeBodyClassLink (scope, elem) { 6 | $rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState) { // eslint-disable-line angular/on-watch 7 | let fromClassnames = angular.isDefined(fromState.data) && angular.isDefined(fromState.data.bodyClass) ? fromState.data.bodyClass : null 8 | let toClassnames = angular.isDefined(toState.data) && angular.isDefined(toState.data.bodyClass) ? toState.data.bodyClass : null 9 | 10 | if (fromClassnames != toClassnames) { 11 | if (fromClassnames) { 12 | elem.removeClass(fromClassnames) 13 | } 14 | 15 | if (toClassnames) { 16 | elem.addClass(toClassnames) 17 | } 18 | } 19 | }) 20 | }, 21 | restrict: 'EA' 22 | } 23 | } 24 | 25 | export const RouteBodyClassComponent = routeBodyClass 26 | -------------------------------------------------------------------------------- /angular/filters/capitalize.filter.js: -------------------------------------------------------------------------------- 1 | export function CapitalizeFilter () { 2 | return function (input) { 3 | return (input) ? input.replace(/([^\W_]+[^\s-]*) */g, function (txt) { 4 | return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase() 5 | }) : '' 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /angular/filters/date_millis.filter.js: -------------------------------------------------------------------------------- 1 | export function DateMillisFilter () { 2 | 'ngInject' 3 | 4 | return function (input) { 5 | return Date.parse(input) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /angular/filters/human_readable.filter.js: -------------------------------------------------------------------------------- 1 | export function HumanReadableFilter () { 2 | return function humanize (str) { 3 | if (!str) { 4 | return '' 5 | } 6 | var frags = str.split('_') 7 | for (var i = 0; i < frags.length; i++) { 8 | frags[i] = frags[i].charAt(0).toUpperCase() + frags[i].slice(1) 9 | } 10 | return frags.join(' ') 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /angular/filters/truncate_characters.filter.js: -------------------------------------------------------------------------------- 1 | export function TruncatCharactersFilter () { 2 | return function (input, chars, breakOnWord) { 3 | if (isNaN(chars)) { 4 | return input 5 | } 6 | if (chars <= 0) { 7 | return '' 8 | } 9 | if (input && input.length > chars) { 10 | input = input.substring(0, chars) 11 | 12 | if (!breakOnWord) { 13 | var lastspace = input.lastIndexOf(' ') 14 | // Get last space 15 | if (lastspace !== -1) { 16 | input = input.substr(0, lastspace) 17 | } 18 | } else { 19 | while (input.charAt(input.length - 1) === ' ') { 20 | input = input.substr(0, input.length - 1) 21 | } 22 | } 23 | return input + '...' 24 | } 25 | return input 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /angular/filters/truncate_words.filter.js: -------------------------------------------------------------------------------- 1 | export function TruncateWordsFilter () { 2 | return function (input, words) { 3 | if (isNaN(words)) { 4 | return input 5 | } 6 | if (words <= 0) { 7 | return '' 8 | } 9 | if (input) { 10 | var inputWords = input.split(/\s+/) 11 | if (inputWords.length > words) { 12 | input = inputWords.slice(0, words).join(' ') + '...' 13 | } 14 | } 15 | return input 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /angular/filters/trust_html.filter.js: -------------------------------------------------------------------------------- 1 | export function TrustHtmlFilter ($sce) { 2 | return function (html) { 3 | return $sce.trustAsHtml(html) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /angular/filters/ucfirst.filter.js: -------------------------------------------------------------------------------- 1 | export function UcFirstFilter () { 2 | return function (input) { 3 | if (!input) { 4 | return null 5 | } 6 | return input.substring(0, 1).toUpperCase() + input.substring(1) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /angular/index.config.js: -------------------------------------------------------------------------------- 1 | import { AclConfig } from './config/acl.config' 2 | import { RoutesConfig } from './config/routes.config' 3 | import { LoadingBarConfig } from './config/loading_bar.config' 4 | import { SatellizerConfig } from './config/satellizer.config' 5 | 6 | angular.module('app.config') 7 | .config(AclConfig) 8 | .config(RoutesConfig) 9 | .config(LoadingBarConfig) 10 | .config(SatellizerConfig) 11 | -------------------------------------------------------------------------------- /angular/index.directives.js: -------------------------------------------------------------------------------- 1 | import { RouteBodyClassComponent } from './directives/route-bodyclass/route-bodyclass.component' 2 | import { PasswordVerifyClassComponent } from './directives/password-verify/password-verify.component' 3 | 4 | angular.module('app.components') 5 | .directive('routeBodyclass', RouteBodyClassComponent) 6 | .directive('passwordVerify', PasswordVerifyClassComponent) 7 | -------------------------------------------------------------------------------- /angular/index.filters.js: -------------------------------------------------------------------------------- 1 | import { DateMillisFilter } from './filters/date_millis.filter' 2 | import { CapitalizeFilter } from './filters/capitalize.filter' 3 | import { HumanReadableFilter } from './filters/human_readable.filter' 4 | import { TruncatCharactersFilter } from './filters/truncate_characters.filter' 5 | import { TruncateWordsFilter } from './filters/truncate_words.filter' 6 | import { TrustHtmlFilter } from './filters/trust_html.filter' 7 | import { UcFirstFilter } from './filters/ucfirst.filter' 8 | 9 | angular.module('app.filters') 10 | .filter('datemillis', DateMillisFilter) 11 | .filter('capitalize', CapitalizeFilter) 12 | .filter('humanreadable', HumanReadableFilter) 13 | .filter('truncateCharacters', TruncatCharactersFilter) 14 | .filter('truncateWords', TruncateWordsFilter) 15 | .filter('trustHtml', TrustHtmlFilter) 16 | .filter('ucfirst', UcFirstFilter) 17 | -------------------------------------------------------------------------------- /angular/index.main.js: -------------------------------------------------------------------------------- 1 | // Modules 2 | import './index.modules' 3 | 4 | // Run 5 | import './index.run' 6 | 7 | // Config 8 | import './index.config' 9 | 10 | // Filters 11 | import './index.filters' 12 | 13 | // Components 14 | import './index.components' 15 | 16 | // Directives 17 | import './index.directives' 18 | 19 | // Services 20 | import './index.services' 21 | -------------------------------------------------------------------------------- /angular/index.modules.js: -------------------------------------------------------------------------------- 1 | angular.module('app', [ 2 | 'app.run', 3 | 'app.filters', 4 | 'app.services', 5 | 'app.components', 6 | 'app.routes', 7 | 'app.config', 8 | 'app.partials' 9 | ]) 10 | 11 | angular.module('app.run', []) 12 | angular.module('app.routes', []) 13 | angular.module('app.filters', []) 14 | angular.module('app.services', []) 15 | angular.module('app.config', []) 16 | angular.module('app.components', [ 17 | 'ui.router', 'angular-loading-bar', 18 | 'restangular', 'ngStorage', 'satellizer', 19 | 'ui.bootstrap', 'chart.js', 'mm.acl', 'datatables', 20 | 'datatables.bootstrap', 'checklist-model' 21 | ]) 22 | -------------------------------------------------------------------------------- /angular/index.run.js: -------------------------------------------------------------------------------- 1 | import { RoutesRun } from './run/routes.run' 2 | 3 | angular.module('app.run') 4 | .run(RoutesRun) 5 | -------------------------------------------------------------------------------- /angular/index.services.js: -------------------------------------------------------------------------------- 1 | import { ContextService } from './services/context.service' 2 | import { APIService } from './services/API.service' 3 | 4 | angular.module('app.services') 5 | .service('ContextService', ContextService) 6 | .service('API', APIService) 7 | -------------------------------------------------------------------------------- /angular/material/page.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /angular/material/project.scss: -------------------------------------------------------------------------------- 1 | $brand: #00A4C6; 2 | $black: #535362; 3 | $grey: #888888; 4 | $navy: #21455B; 5 | $border: #E9F0F3; 6 | $background: #F6F9FA; 7 | -------------------------------------------------------------------------------- /angular/material/toast.scss: -------------------------------------------------------------------------------- 1 | md-toast[md-theme=warn] { 2 | .md-toast-content { 3 | background-color: #F44336; 4 | } 5 | } -------------------------------------------------------------------------------- /angular/material/transitions.scss: -------------------------------------------------------------------------------- 1 | [ui-view].ng-enter, 2 | [ui-view].ng-leave { 3 | -webkit-transition: opacity ease-in-out 200ms; 4 | transition: opacity ease-in-out 200ms; 5 | } 6 | 7 | [ui-view].ng-enter, 8 | [ui-view].ng-leave.ng-leave-active { 9 | opacity: 0; 10 | } 11 | 12 | [ui-view].ng-enter.ng-enter-active { 13 | opacity: 1; 14 | } 15 | 16 | // Stop the page jump when transitioning from page to page. 17 | .Page.ng-leave.ng-leave-active { 18 | display: none; 19 | } -------------------------------------------------------------------------------- /angular/material/utilities.scss: -------------------------------------------------------------------------------- 1 | .u-center{ 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /angular/run/routes.run.js: -------------------------------------------------------------------------------- 1 | export function RoutesRun ($rootScope, $state, $auth, AclService, $timeout, API, ContextService) { 2 | 'ngInject' 3 | 4 | AclService.resume() 5 | 6 | /*eslint-disable */ 7 | let deregisterationCallback = $rootScope.$on('$stateChangeStart', function (event, toState) { 8 | if (toState.data && toState.data.auth) { 9 | if (!$auth.isAuthenticated()) { 10 | event.preventDefault() 11 | return $state.go('login') 12 | } 13 | } 14 | 15 | $rootScope.bodyClass = 'hold-transition login-page' 16 | }) 17 | 18 | function stateChange () { 19 | $timeout(function () { 20 | // fix sidebar 21 | var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight() 22 | var window_height = $(window).height() 23 | var sidebar_height = $('.sidebar').height() 24 | 25 | if ($('body').hasClass('fixed')) { 26 | $('.content-wrapper, .right-side').css('min-height', window_height - $('.main-footer').outerHeight()) 27 | } else { 28 | if (window_height >= sidebar_height) { 29 | $('.content-wrapper, .right-side').css('min-height', window_height - neg) 30 | } else { 31 | $('.content-wrapper, .right-side').css('min-height', sidebar_height) 32 | } 33 | } 34 | 35 | // get user current context 36 | if ($auth.isAuthenticated() && !$rootScope.me) { 37 | ContextService.getContext() 38 | .then((response) => { 39 | response = response.plain() 40 | $rootScope.me = response.data 41 | }) 42 | } 43 | }) 44 | } 45 | 46 | $rootScope.$on('$destroy', deregisterationCallback) 47 | $rootScope.$on('$stateChangeSuccess', stateChange) 48 | /*eslint-enable */ 49 | } 50 | -------------------------------------------------------------------------------- /angular/services/API.service.js: -------------------------------------------------------------------------------- 1 | export class APIService { 2 | constructor (Restangular, $window) { 3 | 'ngInject' 4 | // content negotiation 5 | var headers = { 6 | 'Content-Type': 'application/json', 7 | 'Accept': 'application/x.laravel.v1+json' 8 | } 9 | 10 | return Restangular.withConfig(function (RestangularConfigurer) { 11 | RestangularConfigurer 12 | .setBaseUrl('/api/') 13 | .setDefaultHeaders(headers) 14 | .setErrorInterceptor(function (response) { 15 | if (response.status === 422) { 16 | // for (var error in response.data.errors) { 17 | // return ToastService.error(response.data.errors[error][0]) 18 | // } 19 | } 20 | }) 21 | .addFullRequestInterceptor(function (element, operation, what, url, headers) { 22 | var token = $window.localStorage.satellizer_token 23 | if (token) { 24 | headers.Authorization = 'Bearer ' + token 25 | } 26 | }) 27 | .addResponseInterceptor(function (response, operation, what) { 28 | if (operation === 'getList') { 29 | var newResponse = response.data[what] 30 | newResponse.error = response.error 31 | return newResponse 32 | } 33 | 34 | return response 35 | }) 36 | }) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /angular/services/context.service.js: -------------------------------------------------------------------------------- 1 | export class ContextService { 2 | constructor ($auth, $rootScope, API) { 3 | 'ngInject' 4 | this.$auth = $auth 5 | this.API = API 6 | this.$rootScope = $rootScope 7 | } 8 | 9 | getContext () { 10 | let $auth = this.$auth 11 | 12 | if ($auth.isAuthenticated()) { 13 | let API = this.API 14 | let UserData = API.service('me', API.all('users')) 15 | 16 | return UserData.one().get() 17 | } else { 18 | return null 19 | } 20 | } 21 | 22 | me (cb) { 23 | this.$rootScope.$watch('me', function (nv) { 24 | cb(nv) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 16 | 'email' => 'required|email|exists:users,email', 17 | ]); 18 | 19 | //invalidate old tokens 20 | PasswordReset::whereEmail($request->email)->delete(); 21 | 22 | $email = $request->email; 23 | $reset = PasswordReset::create([ 24 | 'email' => $email, 25 | 'token' => str_random(10), 26 | ]); 27 | 28 | $token = $reset->token; 29 | 30 | Mail::send('emails.reset_link', compact('email', 'token'), function ($mail) use ($email) { 31 | $mail->to($email) 32 | ->from('noreply@example.com') 33 | ->subject('Password reset link'); 34 | }); 35 | 36 | return response()->success(true); 37 | } 38 | 39 | public function verify(Request $request) 40 | { 41 | $this->validate($request, [ 42 | 'email' => 'required|email', 43 | 'token' => 'required', 44 | ]); 45 | 46 | $check = PasswordReset::whereEmail($request->email) 47 | ->whereToken($request->token) 48 | ->first(); 49 | 50 | if (!$check) { 51 | return response()->error('Email does not exist', 422); 52 | } 53 | 54 | return response()->success(true); 55 | } 56 | 57 | public function reset(Request $request) 58 | { 59 | $this->validate($request, [ 60 | 'email' => 'required|email', 61 | 'token' => "required|exists:password_resets,token,email,{$request->email}", 62 | 'password' => 'required|min:8|confirmed', 63 | ]); 64 | 65 | $user = User::whereEmail($request->email)->firstOrFail(); 66 | $user->password = bcrypt($request->password); 67 | $user->save(); 68 | 69 | //delete pending resets 70 | PasswordReset::whereEmail($request->email)->delete(); 71 | 72 | return response()->success(true); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | getValidationFactory()->make($request->all(), $rules, $messages, $customAttributes); 20 | 21 | if ($validator->fails()) { 22 | throw new ValidationHttpException($validator->errors()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 27 | \App\Http\Middleware\EncryptCookies::class, 28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 29 | \Illuminate\Session\Middleware\StartSession::class, 30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 31 | \App\Http\Middleware\VerifyCsrfToken::class, 32 | ], 33 | 34 | 'api' => [ 35 | // 'throttle:60,1', 36 | ], 37 | ]; 38 | 39 | /** 40 | * The application's route middleware. 41 | * 42 | * These middleware may be assigned to groups or used individually. 43 | * 44 | * @var array 45 | */ 46 | protected $routeMiddleware = [ 47 | 'auth' => \App\Http\Middleware\Authenticate::class, 48 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 49 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 50 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 51 | 'role' => \Bican\Roles\Middleware\VerifyRole::class, 52 | 'permission' => \Bican\Roles\Middleware\VerifyPermission::class, 53 | 'level' => \Bican\Roles\Middleware\VerifyLevel::class, 54 | ]; 55 | } 56 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 22 | if ($request->ajax() || $request->wantsJson()) { 23 | return response('Unauthorized.', 401); 24 | } else { 25 | return redirect()->guest('login'); 26 | } 27 | } 28 | 29 | return $next($request); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | return redirect('/'); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | ['web']], function () { 15 | Route::get('/', 'AngularController@serveApp'); 16 | Route::get('/unsupported-browser', 'AngularController@unsupported'); 17 | Route::get('user/verify/{verificationCode}', ['uses' => 'Auth\AuthController@verifyUserEmail']); 18 | Route::get('auth/{provider}', ['uses' => 'Auth\AuthController@redirectToProvider']); 19 | Route::get('auth/{provider}/callback', ['uses' => 'Auth\AuthController@handleProviderCallback']); 20 | Route::get('/api/authenticate/user', 'Auth\AuthController@getAuthenticatedUser'); 21 | }); 22 | 23 | $api->group(['middleware' => ['api']], function ($api) { 24 | $api->controller('auth', 'Auth\AuthController'); 25 | 26 | // Password Reset Routes... 27 | $api->post('auth/password/email', 'Auth\PasswordResetController@sendResetLinkEmail'); 28 | $api->get('auth/password/verify', 'Auth\PasswordResetController@verify'); 29 | $api->post('auth/password/reset', 'Auth\PasswordResetController@reset'); 30 | }); 31 | 32 | $api->group(['middleware' => ['api', 'api.auth']], function ($api) { 33 | $api->get('users/me', 'UserController@getMe'); 34 | $api->put('users/me', 'UserController@putMe'); 35 | }); 36 | 37 | $api->group(['middleware' => ['api', 'api.auth', 'role:admin.super|admin.user']], function ($api) { 38 | $api->controller('users', 'UserController'); 39 | }); 40 | -------------------------------------------------------------------------------- /app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any application authentication / authorization services. 21 | * 22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate 23 | * @return void 24 | */ 25 | public function boot(GateContract $gate) 26 | { 27 | $this->registerPolicies($gate); 28 | 29 | // 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any other events for your application. 23 | * 24 | * @param \Illuminate\Contracts\Events\Dispatcher $events 25 | * @return void 26 | */ 27 | public function boot(DispatcherContract $events) 28 | { 29 | parent::boot($events); 30 | 31 | // 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Providers/ResponseMacroServiceProvider.php: -------------------------------------------------------------------------------- 1 | false, 20 | 'data' => $data, 21 | ]); 22 | }); 23 | 24 | Response::macro('error', function ($message, $status = 400) { 25 | return Response::json([ 26 | 'message' => $status.' error', 27 | 'errors' => [ 28 | 'message' => [$message], 29 | ], 30 | 'status_code' => $status, 31 | ], $status); 32 | }); 33 | } 34 | 35 | /** 36 | * Register the application services. 37 | * 38 | * @return void 39 | */ 40 | public function register() 41 | { 42 | // 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | version($this->version, function ($apiRouter) use ($router) { 51 | $apiRouter->group(['namespace' => $this->namespace], function ($api) use ($router) { 52 | $router->group(['namespace' => $this->namespace], function ($router) use ($api) { 53 | require app_path('Http/routes.php'); 54 | }); 55 | }); 56 | }); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | " 5 | ], 6 | "ignore": [ 7 | "**/.*", 8 | "node_modules", 9 | "bower_components", 10 | "test", 11 | "tests" 12 | ], 13 | "dependencies": { 14 | "jquery": "^2.2.3", 15 | "angular": "~1.5.x", 16 | "angular-ui-router": "~0.2.15", 17 | "ngstorage": "~0.3.10", 18 | "restangular": "~1.5.2", 19 | "angular-loading-bar": "~0.9.0", 20 | "satellizer": "^0.14.0", 21 | "angular-bootstrap": "^1.3.1", 22 | "bootstrap": "^3.3.6", 23 | "AdminLTE": "admin-lte#^2.3.3", 24 | "angular-chart.js": "^0.10.0", 25 | "angular-acl": "^0.1.5", 26 | "angular-datatables": "^0.5.4", 27 | "sweetalert": "^1.1.3", 28 | "checklist-model": "^0.9.0" 29 | }, 30 | "resolutions": { 31 | "angular": "~1.5.x" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Laravel Angular Admin", 3 | "description": "Laravel + Angularjs + Bootstrap + AdminLTE binded by Gulp workflow Admin Dashboard Boilerplate", 4 | "keywords": ["laravel", "angular", "bootstrap", "admin", "admin template", "ui-router", "api", "angular-bootstrap"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=5.5.9", 9 | "laravel/framework": "5.2.*", 10 | "tymon/jwt-auth": "0.5.*", 11 | "barryvdh/laravel-cors": "0.7.x", 12 | "laravelangular/generators": "2.7.x", 13 | "dingo/api": "1.0.x@dev", 14 | "laravel/socialite": "^2.0", 15 | "bican/roles": "2.1.*" 16 | }, 17 | "require-dev": { 18 | "fzaninotto/faker": "~1.4", 19 | "mockery/mockery": "0.9.*", 20 | "phpunit/phpunit": "~4.0", 21 | "symfony/css-selector": "2.8.*|3.0.*", 22 | "symfony/dom-crawler": "2.8.*|3.0.*", 23 | "squizlabs/php_codesniffer": "*" 24 | }, 25 | "autoload": { 26 | "classmap": [ 27 | "database" 28 | ], 29 | "psr-4": { 30 | "App\\": "app/" 31 | } 32 | }, 33 | "autoload-dev": { 34 | "classmap": [ 35 | "tests/TestCase.php" 36 | ] 37 | }, 38 | "scripts": { 39 | "post-root-package-install": [ 40 | "php -r \"copy('.env.example', '.env');\"" 41 | ], 42 | "post-create-project-cmd": [ 43 | "php -r \"unlink('code_of_conduct.md');\"", 44 | "php -r \"unlink('CHANGELOG.md');\"", 45 | "php -r \"unlink('.codeclimate.yml');\"", 46 | "php -r \"unlink('.travis.yml');\"", 47 | "php artisan key:generate", 48 | "php artisan jwt:generate" 49 | ], 50 | "post-install-cmd": [ 51 | "php artisan clear-compiled", 52 | "php -r \"copy('.env.example', '.env');\"", 53 | "php artisan optimize", 54 | "php artisan key:generate" 55 | ], 56 | "pre-update-cmd": [ 57 | "php artisan clear-compiled" 58 | ], 59 | "post-update-cmd": [ 60 | "php artisan optimize" 61 | ] 62 | }, 63 | "config": { 64 | "preferred-install": "dist" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Broadcast Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the broadcast connections that will be used 24 | | to broadcast events to other systems or over websockets. Samples of 25 | | each available type of connection are provided inside this array. 26 | | 27 | */ 28 | 29 | 'connections' => [ 30 | 31 | 'pusher' => [ 32 | 'driver' => 'pusher', 33 | 'key' => env('PUSHER_KEY'), 34 | 'secret' => env('PUSHER_SECRET'), 35 | 'app_id' => env('PUSHER_APP_ID'), 36 | 'options' => [ 37 | // 38 | ], 39 | ], 40 | 41 | 'redis' => [ 42 | 'driver' => 'redis', 43 | 'connection' => 'default', 44 | ], 45 | 46 | 'log' => [ 47 | 'driver' => 'log', 48 | ], 49 | 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc', 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array', 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path('framework/cache'), 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 55 | 'port' => env('MEMCACHED_PORT', 11211), 56 | 'weight' => 100, 57 | ], 58 | ], 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | ], 65 | 66 | ], 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Cache Key Prefix 71 | |-------------------------------------------------------------------------- 72 | | 73 | | When utilizing a RAM based store such as APC or Memcached, there might 74 | | be other applications utilizing the same cache. So, we'll specify a 75 | | value to get prefixed to all our keys so we can avoid collisions. 76 | | 77 | */ 78 | 79 | 'prefix' => 'laravel', 80 | 81 | ]; 82 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | false, 15 | 'allowedOrigins' => ['*'], 16 | 'allowedHeaders' => ['*'], 17 | 'allowedMethods' => ['GET', 'POST', 'PUT', 'DELETE'], 18 | 'exposedHeaders' => [], 19 | 'maxAge' => 0, 20 | 'hosts' => [], 21 | ]; 22 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/generators.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'root' => 'angular', 6 | 'page' => 'app/pages', 7 | 'components' => 'app/components', 8 | 'config' => 'config', 9 | 'dialogs' => 'dialogs', 10 | 'filters' => 'filters', 11 | 'services' => 'services', 12 | ], 13 | 'suffix' => [ 14 | 'component' => '.component.js', 15 | 'componentView' => '.component.html', 16 | 'dialog' => '.dialog.js', 17 | 'dialogView' => '.dialog.html', 18 | 'service' => '.service.js', 19 | 'config' => '.config.js', 20 | 'filter' => '.filter.js', 21 | 'pageView' => '.page.html', 22 | 'stylesheet' => 'scss', 23 | ], 24 | 'tests' => [ 25 | 'enable' => [ 26 | 'components' => true, 27 | 'services' => true, 28 | ], 29 | 'source' => [ 30 | 'root' => 'tests/angular/', 31 | 'components' => 'app/components', 32 | 'services' => 'services', 33 | ], 34 | ], 35 | 'misc' => [ 36 | 'auto_import' => true, 37 | ], 38 | ]; 39 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Queue Connections 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the connection information for each server that 27 | | is used by your application. A default configuration has been added 28 | | for each back-end shipped with Laravel. You are free to add more. 29 | | 30 | */ 31 | 32 | 'connections' => [ 33 | 34 | 'sync' => [ 35 | 'driver' => 'sync', 36 | ], 37 | 38 | 'database' => [ 39 | 'driver' => 'database', 40 | 'table' => 'jobs', 41 | 'queue' => 'default', 42 | 'expire' => 60, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'ttr' => 60, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => 'your-public-key', 55 | 'secret' => 'your-secret-key', 56 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 57 | 'queue' => 'your-queue-name', 58 | 'region' => 'us-east-1', 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | 'queue' => 'default', 65 | 'expire' => 60, 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Failed Queue Jobs 73 | |-------------------------------------------------------------------------- 74 | | 75 | | These options configure the behavior of failed queue job logging so you 76 | | can control which database and table are used to store the jobs that 77 | | have failed. You may change them to any database / table you wish. 78 | | 79 | */ 80 | 81 | 'failed' => [ 82 | 'database' => env('DB_CONNECTION', 'mysql'), 83 | 'table' => 'failed_jobs', 84 | ], 85 | 86 | ]; 87 | -------------------------------------------------------------------------------- /config/roles.php: -------------------------------------------------------------------------------- 1 | null, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Slug Separator 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you can change the slug separator. This is very important in matter 24 | | of magic method __call() and also a `Slugable` trait. The default value 25 | | is a dot. 26 | | 27 | */ 28 | 29 | 'separator' => '.', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Models 34 | |-------------------------------------------------------------------------- 35 | | 36 | | If you want, you can replace default models from this package by models 37 | | you created. Have a look at `Bican\Roles\Models\Role` model and 38 | | `Bican\Roles\Models\Permission` model. 39 | | 40 | */ 41 | 42 | 'models' => [ 43 | 'role' => Bican\Roles\Models\Role::class, 44 | 'permission' => Bican\Roles\Models\Permission::class, 45 | ], 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Roles, Permissions and Allowed "Pretend" 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You can pretend or simulate package behavior no matter what is in your 53 | | database. It is really useful when you are testing you application. 54 | | Set up what will methods is(), can() and allowed() return. 55 | | 56 | */ 57 | 58 | 'pretend' => [ 59 | 60 | 'enabled' => false, 61 | 62 | 'options' => [ 63 | 'is' => true, 64 | 'can' => true, 65 | 'allowed' => true, 66 | ], 67 | 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'mandrill' => [ 23 | 'secret' => env('MANDRILL_SECRET'), 24 | ], 25 | 26 | 'ses' => [ 27 | 'key' => env('SES_KEY'), 28 | 'secret' => env('SES_SECRET'), 29 | 'region' => 'us-east-1', 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | 'github' => [ 39 | 'client_id' => env('GITHUB_CLIENT_ID'), 40 | 'client_secret' => env('GITHUB_CLIENT_SECRET'), 41 | 'redirect' => env('GITHUB_REDIRECT'), 42 | ], 43 | 44 | 'google' => [ 45 | 'client_id' => env('GOOGLE_CLIENT_ID'), 46 | 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 47 | 'redirect' => env('GOOGLE_REDIRECT'), 48 | ], 49 | 50 | 'facebook' => [ 51 | 'client_id' => env('FACEBOOK_CLIENT_ID'), 52 | 'client_secret' => env('FACEBOOK_CLIENT_SECRET'), 53 | 'redirect' => env('FACEBOOK_REDIRECT'), 54 | ], 55 | ]; 56 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->email, 18 | 'email_verified' => 1, 19 | 'email_verification_code' => str_random(10), 20 | 'avatar' => 'test', 21 | //use bcrypt('password') if you want to assert for a specific password, but it might slow down your tests 22 | 'password' => str_random(10), 23 | ]; 24 | }); 25 | 26 | $factory->define(App\PasswordReset::class, function (Faker\Generator $faker) { 27 | return [ 28 | 'email' => $faker->safeEmail, 29 | 'token' => str_random(10), 30 | ]; 31 | }); 32 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/database/migrations/.gitkeep -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('oauth_provider')->nullable(); 18 | $table->string('oauth_provider_id')->nullable(); 19 | $table->string('name'); 20 | $table->string('email')->unique(); 21 | $table->string('password', 60); 22 | $table->string('avatar')->nullable(); 23 | $table->enum('email_verified', ['1', '0'])->default('0'); 24 | $table->string('email_verification_code', 60)->nullable(); 25 | $table->rememberToken(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::drop('users'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 17 | $table->string('token')->index(); 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2015_01_15_105324_create_roles_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 17 | $table->string('name'); 18 | $table->string('slug')->unique(); 19 | $table->string('description')->nullable(); 20 | $table->integer('level')->default(1); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('roles'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2015_01_15_114412_create_role_user_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 17 | $table->integer('role_id')->unsigned()->index(); 18 | $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); 19 | $table->integer('user_id')->unsigned()->index(); 20 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('role_user'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2015_01_26_115212_create_permissions_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 17 | $table->string('name'); 18 | $table->string('slug')->unique(); 19 | $table->string('description')->nullable(); 20 | $table->string('model')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('permissions'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2015_01_26_115523_create_permission_role_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 17 | $table->integer('permission_id')->unsigned()->index(); 18 | $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade'); 19 | $table->integer('role_id')->unsigned()->index(); 20 | $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('permission_role'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2015_02_09_132439_create_permission_user_table.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 17 | $table->integer('permission_id')->unsigned()->index(); 18 | $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade'); 19 | $table->integer('user_id')->unsigned()->index(); 20 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('permission_user'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2016_04_11_070428_create_posts_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('topic'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('posts'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/database/seeds/.gitkeep -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 18 | $this->call(RolesTableSeeder::class); 19 | $this->call(RoleUserTableSeeder::class); 20 | $this->call(PermissionsTableSeeder::class); 21 | $this->call(PermissionRoleTableSeeder::class); 22 | 23 | Model::reguard(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeds/PermissionRoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | [ 16 | 'id' => 1, 17 | 'permission_id' => 1, 18 | 'role_id' => 2, 19 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 20 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 21 | ], [ 22 | 'id' => 2, 23 | 'permission_id' => 2, 24 | 'role_id' => 3, 25 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 26 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 27 | ], [ 28 | 'id' => 3, 29 | 'permission_id' => 3, 30 | 'role_id' => 4, 31 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 32 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 33 | ], [ 34 | 'id' => 4, 35 | 'permission_id' => 1, 36 | 'role_id' => 1, 37 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 38 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 39 | ], [ 40 | 'id' => 5, 41 | 'permission_id' => 2, 42 | 'role_id' => 1, 43 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 44 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 45 | ], [ 46 | 'id' => 6, 47 | 'permission_id' => 3, 48 | 'role_id' => 1, 49 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 50 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 51 | ], 52 | ]); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /database/seeds/PermissionsTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | [ 16 | 'id' => 1, 17 | 'name' => 'Manage Users', 18 | 'slug' => 'manage.users', 19 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 20 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 21 | ], [ 22 | 'id' => 2, 23 | 'name' => 'Manage Roles', 24 | 'slug' => 'manage.roles', 25 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 26 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 27 | ], [ 28 | 'id' => 3, 29 | 'name' => 'Manage Permissions', 30 | 'slug' => 'manage.permissions', 31 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 32 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 33 | ], 34 | ]); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeds/RoleUserTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | [ 16 | 'id' => 1, 17 | 'role_id' => 1, 18 | 'user_id' => 1, 19 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 20 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 21 | ], [ 22 | 'id' => 2, 23 | 'role_id' => 2, 24 | 'user_id' => 1, 25 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 26 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 27 | ], [ 28 | 'id' => 3, 29 | 'role_id' => 3, 30 | 'user_id' => 1, 31 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 32 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 33 | ], [ 34 | 'id' => 4, 35 | 'role_id' => 4, 36 | 'user_id' => 1, 37 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 38 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 39 | ], 40 | ]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/seeds/RolesTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | [ 16 | 'id' => 1, 17 | 'name' => 'Super Admin', 18 | 'slug' => 'admin.super', 19 | 'description' => 'Super Admin', 20 | 'level' => '1', 21 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 22 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 23 | ], [ 24 | 'id' => 2, 25 | 'name' => 'User Admin', 26 | 'slug' => 'admin.user', 27 | 'description' => 'Can manage users', 28 | 'level' => '1', 29 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 30 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 31 | ], [ 32 | 'id' => 3, 33 | 'name' => 'Role Admin', 34 | 'slug' => 'admin.role', 35 | 'description' => 'Can manage user roles', 36 | 'level' => '1', 37 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 38 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 39 | ], [ 40 | 'id' => 4, 41 | 'name' => 'Permission Admin', 42 | 'slug' => 'admin.permission', 43 | 'description' => 'Can manage permissions', 44 | 'level' => '1', 45 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 46 | 'updated_at' => \Carbon\Carbon::now()->toDateTimeString(), 47 | ], 48 | ]); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'id' => 1, 16 | 'name' => 'admin', 17 | 'email' => 'admin@example.com', 18 | 'password' => bcrypt('password'), 19 | 'email_verified' => '1', 20 | 'created_at' => \Carbon\Carbon::now()->toDateTimeString(), 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /elixir.json: -------------------------------------------------------------------------------- 1 | { 2 | "js": { 3 | "outputFolder": "public/js" 4 | }, 5 | "css": { 6 | "outputFolder": "public/css", 7 | "sass": { 8 | "folder": "../../angular/" 9 | }, 10 | "lteSkin": "skin-blue.css" 11 | }, 12 | "fonts": { 13 | "outputFolder": "public/fonts" 14 | }, 15 | "buildPath": "public/build" 16 | } 17 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir') 2 | 3 | require('./tasks/concatScripts.task.js') 4 | require('laravel-elixir-karma') 5 | require('./tasks/angular.task.js') 6 | require('./tasks/bower.task.js') 7 | require('./tasks/ngHtml2Js.task.js') 8 | 9 | if (!elixir.config.production) { 10 | require('./tasks/phpcs.task.js') 11 | } 12 | 13 | /* 14 | |-------------------------------------------------------------------------- 15 | | Elixir Asset Management 16 | |-------------------------------------------------------------------------- 17 | | 18 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 19 | | for your Laravel application. By default, we are compiling the Sass 20 | | file for our application, as well as publishing vendor resources. 21 | | 22 | */ 23 | 24 | elixir(function (mix) { 25 | var jsOutputFolder = config.js.outputFolder 26 | var cssOutputFolder = config.css.outputFolder 27 | var fontsOutputFolder = config.fonts.outputFolder 28 | var buildPath = config.buildPath 29 | 30 | var assets = [ 31 | 'public/js/final.js', 32 | 'public/css/final.css' 33 | ], 34 | scripts = [ 35 | './public/js/vendor.js', 36 | './public/js/partials.js', 37 | './public/js/app.js', 38 | './public/dist/js/app.js' 39 | ], 40 | styles = [ 41 | './public/css/vendor.css', 42 | './public/css/app.css' 43 | ], 44 | karmaJsDir = [ 45 | jsOutputFolder + '/vendor.js', 46 | 'node_modules/angular-mocks/angular-mocks.js', 47 | 'node_modules/ng-describe/dist/ng-describe.js', 48 | jsOutputFolder + '/partials.js', 49 | jsOutputFolder + '/app.js', 50 | 'tests/angular/**/*.spec.js' 51 | ] 52 | 53 | mix 54 | .bower() 55 | .angular('./angular/') 56 | .ngHtml2Js('./angular/**/*.html') 57 | .concatScripts(scripts, 'final.js') 58 | .sass('./angular/**/*.scss', 'public/css') 59 | .styles(styles, './public/css/final.css') 60 | .version(assets) 61 | .browserSync({ 62 | proxy: 'localhost:8000' 63 | }) 64 | .karma({ 65 | jsDir: karmaJsDir 66 | }) 67 | 68 | mix 69 | .copy(fontsOutputFolder, buildPath + '/fonts') 70 | }) 71 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function (config) { 2 | config.set({ 3 | basePath: '', 4 | frameworks: ['browserify', 'jasmine'], 5 | files: [ 6 | 'public/js/vendor.js', 7 | 'node_modules/angular-mocks/angular-mocks.js', 8 | 'node_modules/ng-describe/dist/ng-describe.js', 9 | 'public/js/partials.js', 10 | 'public/js/app.js', 11 | 'tests/angular/**/*.spec.js' 12 | ], 13 | browsers: ['PhantomJS'], 14 | 15 | exclude: [], 16 | 17 | preprocessors: { 18 | 'tests/angular/**/*.spec.js': ['browserify'] 19 | }, 20 | 21 | browserify: { 22 | debug: true, 23 | transform: ['babelify', 'stringify'] 24 | }, 25 | 26 | plugins: [ 27 | 'karma-jasmine', 28 | 'karma-phantomjs-launcher', 29 | 'karma-browserify' 30 | ] 31 | 32 | // define reporters, port, logLevel, browsers etc. 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "devDependencies": { 4 | "angular-mocks": "^1.5.2", 5 | "bower": "^1.7.9", 6 | "jasmine-core": "^2.4.1", 7 | "karma": "^0.13.22", 8 | "karma-babel-preprocessor": "~4.0.0", 9 | "karma-browserify": "^4.0.0", 10 | "karma-chrome-launcher": "^0.2.3", 11 | "karma-jasmine": "^0.3.8", 12 | "karma-ngannotate-preprocessor": "^0.1.2", 13 | "karma-phantomjs-launcher": "^1.0.0", 14 | "laravel-elixir-karma": "^0.2.2", 15 | "ng-describe": "^1.8.0", 16 | "phantomjs-prebuilt": "^2.1.6", 17 | "stringify": "^3.1.0", 18 | "vinyl-buffer": "~1.0.0", 19 | "vinyl-source-stream": "~1.0.0" 20 | }, 21 | "dependencies": { 22 | "babel": "^4.0.2", 23 | "babel-core": "^6.4.5", 24 | "babel-loader": "^6.2.1", 25 | "babel-preset-es2015": "^6.3.13", 26 | "babelify": "^5.0.3", 27 | "bower": "^1.7.9", 28 | "browserify": "~8.1.3", 29 | "eslint": "^1.10.3", 30 | "eslint-plugin-angular": "^0.15.0", 31 | "gulp": "^3.8.8", 32 | "gulp-add-src": "^0.2.0", 33 | "gulp-concat": "^2.6.0", 34 | "gulp-concat-sourcemap": "^1.3.1", 35 | "gulp-cssnano": "^2.1.1", 36 | "gulp-eslint": "^1.1.1", 37 | "gulp-filter": "^1.0.2", 38 | "gulp-htmlmin": "^1.3.0", 39 | "gulp-if": "^1.2.5", 40 | "gulp-ng-annotate": "^1", 41 | "gulp-ng-html2js": "^0.2.0", 42 | "gulp-notify": "^2.0.0", 43 | "gulp-phpcs": "^1.0.0", 44 | "gulp-sass": "^2.3.2", 45 | "gulp-sourcemaps": "^1", 46 | "gulp-uglify": "^1", 47 | "gulp-util": "^3.0.3", 48 | "laravel-elixir": "^4.2.1", 49 | "laravel-elixir-karma": "^0.2.2", 50 | "main-bower-files": "^2.1.0", 51 | "underscore": "^1.8.3", 52 | "webpack": "^1.12.11", 53 | "webpack-dev-server": "^1.14.1", 54 | "webpack-stream": "^3.1.0" 55 | }, 56 | "engines": { 57 | "npm": ">=3" 58 | }, 59 | "scripts": { 60 | "postinstall": "bower install && gulp --production" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/ 14 | 15 | 16 | 17 | 18 | app/ 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/favicon.ico -------------------------------------------------------------------------------- /public/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/avatar.png -------------------------------------------------------------------------------- /public/img/avatar04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/avatar04.png -------------------------------------------------------------------------------- /public/img/avatar2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/avatar2.png -------------------------------------------------------------------------------- /public/img/avatar3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/avatar3.png -------------------------------------------------------------------------------- /public/img/avatar5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/avatar5.png -------------------------------------------------------------------------------- /public/img/boxed-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/boxed-bg.jpg -------------------------------------------------------------------------------- /public/img/boxed-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/boxed-bg.png -------------------------------------------------------------------------------- /public/img/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/cover.jpg -------------------------------------------------------------------------------- /public/img/credit/american-express.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/american-express.png -------------------------------------------------------------------------------- /public/img/credit/cirrus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/cirrus.png -------------------------------------------------------------------------------- /public/img/credit/mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/mastercard.png -------------------------------------------------------------------------------- /public/img/credit/mestro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/mestro.png -------------------------------------------------------------------------------- /public/img/credit/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/paypal.png -------------------------------------------------------------------------------- /public/img/credit/paypal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/paypal2.png -------------------------------------------------------------------------------- /public/img/credit/visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/credit/visa.png -------------------------------------------------------------------------------- /public/img/default-50x50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/default-50x50.gif -------------------------------------------------------------------------------- /public/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/icons.png -------------------------------------------------------------------------------- /public/img/icons/angular-generators.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/img/icons/folder-byfeature.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /public/img/icons/json-webtoken.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /public/img/icons/logo-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/img/icons/restful-api.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/img/photo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/photo1.png -------------------------------------------------------------------------------- /public/img/photo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/photo2.png -------------------------------------------------------------------------------- /public/img/photo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/photo3.jpg -------------------------------------------------------------------------------- /public/img/photo4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/photo4.jpg -------------------------------------------------------------------------------- /public/img/user1-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user1-128x128.jpg -------------------------------------------------------------------------------- /public/img/user2-160x160.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user2-160x160.jpg -------------------------------------------------------------------------------- /public/img/user3-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user3-128x128.jpg -------------------------------------------------------------------------------- /public/img/user4-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user4-128x128.jpg -------------------------------------------------------------------------------- /public/img/user5-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user5-128x128.jpg -------------------------------------------------------------------------------- /public/img/user6-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user6-128x128.jpg -------------------------------------------------------------------------------- /public/img/user7-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user7-128x128.jpg -------------------------------------------------------------------------------- /public/img/user8-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/public/img/user8-128x128.jpg -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Register The Auto Loader 12 | |-------------------------------------------------------------------------- 13 | | 14 | | Composer provides a convenient, automatically generated class loader for 15 | | our application. We just need to utilize it! We'll simply require it 16 | | into the script here so that we don't have to worry about manual 17 | | loading any of our classes later on. It feels nice to relax. 18 | | 19 | */ 20 | 21 | require __DIR__.'/../bootstrap/autoload.php'; 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Turn On The Lights 26 | |-------------------------------------------------------------------------- 27 | | 28 | | We need to illuminate PHP development, so let us turn on the lights. 29 | | This bootstraps the framework and gets it ready for use, then it 30 | | will load up this application so that we can run it and send 31 | | the responses back to the browser and delight our users. 32 | | 33 | */ 34 | 35 | $app = require_once __DIR__.'/../bootstrap/app.php'; 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Run The Application 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Once we have the application, we can handle the incoming request 43 | | through the kernel, and send the associated response back to 44 | | the client's browser allowing them to enjoy the creative 45 | | and wonderful application we have prepared for them. 46 | | 47 | */ 48 | 49 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Illuminate\Http\Request::capture() 53 | ); 54 | 55 | $response->send(); 56 | 57 | $kernel->terminate($request, $response); 58 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Be right back. 5 | 6 | 7 | 8 | 39 | 40 | 41 |
42 |
43 |
Be right back.
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Laravel Angular Admin-LTE 14 | 15 | 16 | 20 | 21 | 22 |
23 |
24 |
25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/views/unsupported_browser.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Laravel 5 angular material starter 5 | 6 | 7 | 8 | 9 |

Please update your browser

10 |
11 |
You are using an old version of Internet Explorer
12 | Please update it or try one of these options. 13 |
14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 |
22 | 23 |
24 | 25 |
26 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/resources/views/vendor/.gitkeep -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Laravel 5 | 6 | 7 | 8 | 37 | 38 | 39 |
40 |
41 |
Laravel 5
42 |
43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | $uri = urldecode( 9 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 10 | ); 11 | 12 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 13 | // built-in PHP web server. This provides a convenient way to test a Laravel 14 | // application without having installed a "real" web server software here. 15 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 16 | return false; 17 | } 18 | 19 | require_once __DIR__.'/public/index.php'; 20 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | compiled.php 4 | services.json 5 | events.scanned.php 6 | routes.scanned.php 7 | down 8 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tasks/angular.task.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp') 2 | var concat = require('gulp-concat') 3 | var sourcemaps = require('gulp-sourcemaps') 4 | var eslint = require('gulp-eslint') 5 | var uglify = require('gulp-uglify') 6 | var ngAnnotate = require('gulp-ng-annotate') 7 | var notify = require('gulp-notify') 8 | var gulpif = require('gulp-if') 9 | var webpack = require('webpack-stream') 10 | var webpackConfig = require('../webpack.config.js') 11 | var Elixir = require('laravel-elixir') 12 | var Task = Elixir.Task 13 | 14 | Elixir.extend('angular', function (src, output, outputFilename) { 15 | var baseDir = src || Elixir.config.assetsPath + '/angular/' 16 | new Task('angular in ' + baseDir, function () { 17 | return gulp.src([baseDir + 'index.main.js', baseDir + '**/*.*.js']) 18 | .pipe(eslint({ 19 | globals: { 20 | 'jQuery': false, 21 | '$': true, 22 | 'swal': true 23 | } 24 | })) 25 | .pipe(eslint.format()) 26 | .pipe(gulpif(!config.production, sourcemaps.init())) 27 | .pipe(webpack(webpackConfig)) 28 | .pipe(ngAnnotate()) 29 | .pipe(gulpif(config.production, uglify())) 30 | .pipe(gulpif(!config.production, sourcemaps.write())) 31 | .pipe(gulp.dest(output || config.js.outputFolder)) 32 | .pipe(notify({ 33 | title: 'Laravel Elixir', 34 | subtitle: 'Angular Compiled!', 35 | icon: __dirname + '/../node_modules/laravel-elixir/icons/laravel.png', 36 | message: ' ' 37 | })) 38 | }).watch(baseDir + '/**/*.js') 39 | }) 40 | -------------------------------------------------------------------------------- /tasks/concatScripts.task.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp') 2 | var concat = require('gulp-concat') 3 | 4 | var Elixir = require('laravel-elixir') 5 | 6 | var Task = Elixir.Task 7 | 8 | Elixir.extend('concatScripts', function (scripts, dest) { 9 | new Task('concat-scripts', function () { 10 | return gulp.src(scripts) 11 | .pipe(concat(dest)) 12 | .pipe(gulp.dest(Elixir.config.js.outputFolder)) 13 | }).watch(scripts) 14 | }) 15 | -------------------------------------------------------------------------------- /tasks/ngHtml2Js.task.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'), 2 | ngHtml2Js = require('gulp-ng-html2js'), 3 | minifyHtml = require('gulp-htmlmin'), 4 | uglify = require('gulp-uglify'), 5 | gulpIf = require('gulp-if'), 6 | concat = require('gulp-concat'), 7 | elixir = require('laravel-elixir'), 8 | config = elixir.config, 9 | _ = require('underscore'), 10 | Elixir = require('laravel-elixir') 11 | 12 | elixir.extend('ngHtml2Js', function (src, output, options) { 13 | var defaultOptions = { 14 | moduleName: 'app.partials', 15 | prefix: './views/' 16 | } 17 | 18 | options = _.extend(defaultOptions, options) 19 | 20 | var paths = new elixir.GulpPaths() 21 | .src(src || ['**/*.{htm,html}'], config.get('assets.js.folder')) 22 | .output(output || Elixir.config.js.outputFolder, 'partials.js') 23 | 24 | new elixir.Task('ngHtml2Js', function () { 25 | return gulp.src(paths.src.path) 26 | .pipe(gulpIf(elixir.config.production, minifyHtml({ 27 | empty: true, 28 | spare: true, 29 | quotes: true 30 | }))) 31 | .pipe(ngHtml2Js(options)) 32 | .pipe(concat(paths.output.name)) 33 | .pipe(gulpIf(elixir.config.production, uglify())) 34 | .pipe(gulp.dest(paths.output.baseDir)) 35 | }) 36 | .watch(paths.src.path) 37 | }) 38 | -------------------------------------------------------------------------------- /tasks/phpcs.task.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp') 2 | var phpcs = require('gulp-phpcs') 3 | var Elixir = require('laravel-elixir') 4 | var Task = Elixir.Task 5 | 6 | new Task('phpcs', function () { 7 | return gulp.src(['app/**/**/*.php']) 8 | .pipe(phpcs({ 9 | bin: 'vendor/bin/phpcs', 10 | standard: 'PSR2', 11 | warningSeverity: 0 12 | })) 13 | .pipe(phpcs.reporter('log')) 14 | }) 15 | 16 | new Task('phpcs:config', function () { 17 | return gulp.src(['config/*.php']) 18 | .pipe(phpcs({ 19 | bin: 'vendor/bin/phpcs', 20 | standard: 'PSR2', 21 | warningSeverity: 0 22 | })) 23 | .pipe(phpcs.reporter('log')) 24 | }) 25 | -------------------------------------------------------------------------------- /tests/AngularGeneratorCommandsTest.php: -------------------------------------------------------------------------------- 1 | assertEquals($exitCode, 0); 12 | 13 | $this->assertContains('ng:page', $output); 14 | $this->assertContains('ng:dialog', $output); 15 | $this->assertContains('ng:component', $output); 16 | $this->assertContains('ng:service', $output); 17 | $this->assertContains('ng:filter', $output); 18 | $this->assertContains('ng:config', $output); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/JwtAuthTest.php: -------------------------------------------------------------------------------- 1 | create([ 15 | 'password' => bcrypt('test12345'), 16 | 'email_verified' => '1', 17 | ]); 18 | 19 | $this->post('/api/auth/login', [ 20 | 'email' => $user->email, 21 | 'password' => 'test12345', 22 | ]) 23 | ->seeApiSuccess() 24 | ->seeJsonKeyValueString('email', $user->email) 25 | ->seeJsonKey('token') 26 | ->dontSee('"password"'); 27 | } 28 | 29 | /** 30 | * Test failed login with JWT. 31 | */ 32 | public function testFailedLogin() 33 | { 34 | $user = factory(App\User::class)->create([ 35 | 'email_verified' => '1', 36 | ]); 37 | 38 | $this->post('/api/auth/login', [ 39 | 'email' => $user->email, 40 | 'password' => str_random(10), 41 | ]) 42 | ->seeApiError(401) 43 | ->dontSee($user->email) 44 | ->dontSee('"token"'); 45 | } 46 | 47 | /** 48 | * Test successful registration. 49 | */ 50 | public function testSuccessfulRegistration() 51 | { 52 | $user = factory(App\User::class)->make(); 53 | 54 | $this->post('/api/auth/register', [ 55 | 'name' => $user->name, 56 | 'email' => $user->email, 57 | 'password' => 'test15125', 58 | 'password_confirmation' => 'test15125', 59 | 'email_verified' => '1', 60 | ]) 61 | ->seeApiSuccess() 62 | ->seeJsonKeyValueString('email', $user->email) 63 | ->seeJsonKey('token'); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /tests/LaravelRoutesTest.php: -------------------------------------------------------------------------------- 1 | call('GET', '/'); 14 | 15 | $this->assertEquals(200, $response->status()); 16 | } 17 | 18 | public function testUnsupportedBrowserPage() 19 | { 20 | $this->visit('/unsupported-browser') 21 | ->see('update your browser') 22 | ->see('Internet Explorer'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/angular/app/components/charts-chartjs.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test charts-chartjs component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/coming-soon.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test coming-soon component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/forgot-password.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test forgot-password component', 3 | modules: 'app', 4 | inject: '$http', 5 | element: '', 6 | http: { 7 | post: { 8 | '/api/auth/password/email': { 9 | data: true 10 | } 11 | } 12 | }, 13 | tests: function (deps) { 14 | it('Should have email', () => { 15 | var inputs = deps.element.find('input') 16 | expect(inputs.length).toBe(1) 17 | 18 | var email = deps.element.find('input')[0] 19 | expect(email.attributes['type'].value).toBe('email') 20 | }) 21 | 22 | it('should request email verification successfully', () => { 23 | var component = deps.element.isolateScope().vm 24 | 25 | component.email = 'email@localhost.com' 26 | component.submit() 27 | 28 | deps.http.flush() 29 | }) 30 | } 31 | }) 32 | -------------------------------------------------------------------------------- /tests/angular/app/components/forms-general.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test forms-general component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/login-form/login-form.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test login-form component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('Should have email and password inputs', () => { 7 | var inputs = deps.element.find('input') 8 | expect(inputs.length).toBe(2) 9 | var email = deps.element.find('input')[0] 10 | expect(email.attributes['type'].value).toBe('email') 11 | var passsword = deps.element.find('input')[1] 12 | expect(passsword.attributes['type'].value).toBe('password') 13 | }) 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /tests/angular/app/components/register-form/register-form.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test register-form component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('Should have name, email, password and password confirmation', () => { 7 | var inputs = deps.element.find('input') 8 | expect(inputs.length).toBe(4) 9 | var name = deps.element.find('input')[0] 10 | expect(name.attributes['type'].value).toBe('text') 11 | var email = deps.element.find('input')[1] 12 | expect(email.attributes['type'].value).toBe('email') 13 | var password = deps.element.find('input')[2] 14 | expect(password.attributes['type'].value).toBe('password') 15 | var password_confirmation = deps.element.find('input')[3] 16 | expect(password_confirmation.attributes['type'].value).toBe('password') 17 | }) 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /tests/angular/app/components/reset-password.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test reset-password component', 3 | modules: 'app', 4 | inject: '$http', 5 | element: '', 6 | http: { 7 | get: { 8 | '/api/auth/password/verify': { 9 | data: true 10 | } 11 | }, 12 | post: { 13 | '/api/auth/password/reset': { 14 | data: true 15 | } 16 | } 17 | }, 18 | tests: function (deps) { 19 | it('Should have password and password confirmation', () => { 20 | var inputs = deps.element.find('input') 21 | expect(inputs.length).toBe(2) 22 | 23 | var password = deps.element.find('input')[0] 24 | expect(password.attributes['type'].value).toBe('password') 25 | 26 | var password_confirmation = deps.element.find('input')[1] 27 | expect(password_confirmation.attributes['type'].value).toBe('password') 28 | }) 29 | 30 | it('should submit password reset successfully', () => { 31 | var component = deps.element.isolateScope().vm 32 | 33 | component.submit() 34 | 35 | deps.http.flush() 36 | }) 37 | } 38 | }) 39 | -------------------------------------------------------------------------------- /tests/angular/app/components/routeCssClassnames.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test routeCssClassnames component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/tables-simple.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test tables-simple component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/ui-buttons.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test ui-buttons component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/ui-general.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test ui-general component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/ui-icons.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test ui-icons component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/ui-modal.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test ui-modal component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/ui-timeline.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test ui-timeline component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-edit.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-edit component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users/roles': { 8 | data: true 9 | }, 10 | '/api/users/show': { 11 | data: true 12 | } 13 | } 14 | }, 15 | tests: function (deps) { 16 | it('Should have name, email', () => { 17 | var inputs = deps.element.find('input') 18 | expect(inputs.length).toBe(2) 19 | 20 | var name = deps.element.find('input')[0] 21 | expect(name.attributes['type'].value).toBe('text') 22 | 23 | var email = deps.element.find('input')[1] 24 | expect(email.attributes['type'].value).toBe('email') 25 | }) 26 | } 27 | }) 28 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-lists.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-lists component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users': { 8 | data: true 9 | } 10 | } 11 | }, 12 | tests: function (deps) { 13 | it('delete is a function', () => { 14 | var component = deps.element.isolateScope().vm 15 | la(typeof component.delete === 'function') 16 | }) 17 | } 18 | }) 19 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-permissions-add.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-permissions-add component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('Should have name, slug and description', () => { 7 | var inputs = deps.element.find('input') 8 | expect(inputs.length).toBe(2) 9 | 10 | var name = deps.element.find('input')[0] 11 | expect(name.attributes['type'].value).toBe('text') 12 | 13 | var textarea = deps.element.find('textarea') 14 | expect(textarea.length).toBe(1) 15 | }) 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-permissions-edit.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-permissions-edit component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users/permissions-show': { 8 | data: true 9 | } 10 | } 11 | }, 12 | tests: function (deps) { 13 | it('Should have name, slug and description', () => { 14 | var inputs = deps.element.find('input') 15 | expect(inputs.length).toBe(2) 16 | 17 | var name = deps.element.find('input')[0] 18 | expect(name.attributes['type'].value).toBe('text') 19 | 20 | var textarea = deps.element.find('textarea') 21 | expect(textarea.length).toBe(1) 22 | }) 23 | } 24 | }) 25 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-permissions.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-permissions component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users/permissions': { 8 | data: true 9 | } 10 | } 11 | }, 12 | tests: function (deps) { 13 | it('basic test', () => { 14 | // 15 | }) 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-profile.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-profile component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users/me': { 8 | data: true 9 | } 10 | } 11 | }, 12 | tests: function (deps) { 13 | it('Should have name, email, password inputs', () => { 14 | var inputs = deps.element.find('input') 15 | expect(inputs.length).toBe(5) 16 | 17 | var name = deps.element.find('input')[0] 18 | expect(name.attributes['type'].value).toBe('text') 19 | 20 | var email = deps.element.find('input')[1] 21 | expect(email.attributes['type'].value).toBe('email') 22 | 23 | var passsword = deps.element.find('input')[2] 24 | expect(passsword.attributes['type'].value).toBe('password') 25 | 26 | var passsword = deps.element.find('input')[3] 27 | expect(passsword.attributes['type'].value).toBe('password') 28 | 29 | var passsword = deps.element.find('input')[4] 30 | expect(passsword.attributes['type'].value).toBe('password') 31 | }) 32 | } 33 | }) 34 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-roles-add.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-roles-add component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('Should have role, slug and description', () => { 7 | var inputs = deps.element.find('input') 8 | expect(inputs.length).toBe(2) 9 | 10 | var role = deps.element.find('input')[0] 11 | expect(role.attributes['type'].value).toBe('text') 12 | 13 | var slug = deps.element.find('input')[1] 14 | expect(slug.attributes['type'].value).toBe('text') 15 | 16 | var textarea = deps.element.find('textarea') 17 | expect(textarea.length).toBe(1) 18 | }) 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-roles-edit.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-roles-edit component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users/permissions': { 8 | data: true 9 | }, 10 | '/api/users/roles-show': { 11 | data: true 12 | } 13 | } 14 | }, 15 | tests: function (deps) { 16 | it('Should have role, slug and description', () => { 17 | var inputs = deps.element.find('input') 18 | expect(inputs.length).toBe(2) 19 | 20 | var role = deps.element.find('input')[0] 21 | expect(role.attributes['type'].value).toBe('text') 22 | 23 | var slug = deps.element.find('input')[1] 24 | expect(slug.attributes['type'].value).toBe('text') 25 | 26 | var textarea = deps.element.find('textarea') 27 | expect(textarea.length).toBe(1) 28 | }) 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-roles.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-roles component', 3 | modules: 'app', 4 | element: '', 5 | http: { 6 | get: { 7 | '/api/users/roles': { 8 | data: true 9 | } 10 | } 11 | }, 12 | tests: function (deps) { 13 | it('basic test2', () => { 14 | // 15 | }) 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /tests/angular/app/components/user-verification.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test user-verification component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/app/components/widgets.component.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test widgets component', 3 | modules: 'app', 4 | element: '', 5 | tests: function (deps) { 6 | it('basic test', () => { 7 | // 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /tests/angular/config/routes.config.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test routes configuration', 3 | inject: ['$location', '$state'], 4 | modules: 'app', 5 | tests: function (deps) { 6 | function goTo (url) { 7 | deps.$location.path(url) 8 | deps.$rootScope.$digest() 9 | } 10 | describe('path', function () { 11 | describe('when empty', function () { 12 | it('should go to the app.landing state 1', function () { 13 | goTo('') 14 | expect(deps.$state.$current.name).toEqual('app.landing') 15 | }) 16 | }) 17 | 18 | describe('when /landing', function () { 19 | it('should go to the app.landing state 2', function () { 20 | goTo('/landing') 21 | expect(deps.$state.$current.name).toEqual('app.landing') 22 | }) 23 | }) 24 | 25 | describe('when /login', function () { 26 | it('should go to the login state', function () { 27 | goTo('/login') 28 | expect(deps.$state.$current.name).toEqual('login') 29 | }) 30 | }) 31 | 32 | describe('when /register', function () { 33 | it('should go to the register state', function () { 34 | goTo('/register') 35 | expect(deps.$state.$current.name).toEqual('register') 36 | }) 37 | }) 38 | }) 39 | } 40 | }) 41 | -------------------------------------------------------------------------------- /tests/angular/services/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silverbux/laravel-angular-admin/edf8c77220befe83cbd6b10c1fa463b8d8c76738/tests/angular/services/.gitkeep -------------------------------------------------------------------------------- /tests/angular/services/context.service.spec.js: -------------------------------------------------------------------------------- 1 | ngDescribe({ 2 | name: 'Test ContextService', 3 | modules: 'app', 4 | inject: 'ContextService', 5 | tests: function (deps) { 6 | it('me is a function', () => { 7 | la(typeof deps.ContextService.me === 'function') 8 | }) 9 | 10 | it('getContext is a function', () => { 11 | la(typeof deps.ContextService.getContext === 'function') 12 | }) 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // configuration 3 | entry: './angular/index.main.js', 4 | output: { 5 | filename: 'app.js' 6 | }, 7 | module: { 8 | loaders: [{ 9 | test: /\.js?$/, 10 | exclude: /(node_modules|bower_components)/, 11 | loader: 'babel', // 'babel-loader' is also a legal name to reference 12 | query: { 13 | presets: ['es2015'], 14 | cacheDirectory: true 15 | } 16 | }] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wercker.yml: -------------------------------------------------------------------------------- 1 | box: nodesource/trusty 2 | build: 3 | steps: 4 | - npm-install 5 | - script: 6 | name: install test utilities 7 | code: sudo npm install -g standard 8 | - npm-test 9 | - script: 10 | name: echo nodejs information 11 | code: | 12 | echo "node version $(node -v) running" 13 | echo "npm version $(npm -v) running" 14 | - script: 15 | name: 'npm: install gulp-cli' 16 | code: 'npm install -g gulp-cli' 17 | - script: 18 | name: 'npm: install bower' 19 | code: 'npm install -g bower' 20 | - script: 21 | name: 'bower: install dependencies' 22 | code: 'bower install --allow-root --config.interactive=false' 23 | - script: 24 | name: 'App Build' 25 | code: 'gulp --production' 26 | --------------------------------------------------------------------------------