12 | DialogService.alert('This is an alert title', 'You can specify some description text in here.');
13 |
14 | //use artisan ng:dialog add_users
15 | //$scope is optional. You'll be able to use $scope.$parent from within the dialog's controller
16 | DialogService.fromTemplate('add_users', $scope);
17 |
18 |
19 |
20 |
21 | DialogService
22 | can be extended to suit your needs.
23 |
19 | dingo/api package is meant to provide you, with a set of tools to help you easily and quickly build your own API. dingo/api works out of the box in Laravel angular material starter.
20 | Feel free to check their wiki to customize it.
21 | dingo/api is configured to work harmoniously with JWT-auth.
22 |
12 | The Laravel 5.1 that you loved, comes pre-configured to run with AngularJS:
13 |
14 |
15 |
JWT Authentication
16 |
A view (resources/index.blade.php) that loads all the assets you need (CSS and JS) &
17 | sets up angular ui-router
18 |
19 |
Support for CSRF token when using the API
20 |
Debugbar for
21 | Laravel 5: It's that bar you see at the bottom. Very useful for debugging the API
22 |
23 |
Sample API endpoints
24 |
Elixir configuration for Angular, jshint, bower and views.
25 |
Optimized deployment script.
26 |
API response macro
27 |
28 |
29 |
30 |
31 |
32 |
33 |
AngularJS
34 |
35 |
36 | AngularJS comes ready to communicate with the Laravel 5 API that you're building. It
37 | actually
38 | comes with a few sample API endpoints!
39 |
40 |
41 | This is what you have out of the box:
42 |
43 |
44 |
A flexible and powerful router for Angular: ui-router
46 |
Restangular makes
47 | communicating with the API a breeze!
48 |
49 |
Support for CSRF token via Restangular
50 |
51 |
Sample UI router with multiple views (main & footer)
52 |
UI Router sample authentication
53 |
ngstorage module which simplifies access to localStorage.. The Angular way!
54 |
Angular Material Icons with SVG morpheus
55 |
56 |
57 |
58 |
59 |
60 |
61 |
Angular Material
62 |
63 |
64 | Material Design as a UI library!
65 |
66 |
67 | Here's what you'll get:
68 |
69 |
70 |
Sample Landing and Dashboard pages design with Material Design
71 |
Custom Material Design theme so that you can easily create your own theme
14 | Open /unsupported-browser to see the unsupported browser page that shows for Internet Explorer 10 or below.
15 |
16 |
17 | This is necessary because Angular Material uses the newest features in CSS (such as flexbox or its layout).
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/angular/app/unsupported_browser/unsupported_browser.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.controllers').controller('UnsupportedBrowserCtrl', function(){
5 | //
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/angular/config/auth.js:
--------------------------------------------------------------------------------
1 | (function (){
2 | "use strict";
3 |
4 | angular.module('app.config').config(function ($authProvider){
5 | // Satellizer configuration that specifies which API
6 | // route the JWT should be retrieved from
7 | $authProvider.loginUrl = '/api/authenticate/auth';
8 | });
9 |
10 | })();
11 |
--------------------------------------------------------------------------------
/angular/config/loading_bar.js:
--------------------------------------------------------------------------------
1 | (function (){
2 | "use strict";
3 |
4 | angular.module('app.config').config(function (cfpLoadingBarProvider){
5 | cfpLoadingBarProvider.includeSpinner = false;
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/angular/config/restangular.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.config').config( function(RestangularProvider) {
5 | RestangularProvider
6 | .setBaseUrl('/api/')
7 | .setDefaultHeaders({ accept: "application/x.laravel.v1+json" });
8 | });
9 |
10 | })();
11 |
--------------------------------------------------------------------------------
/angular/config/theme.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.config').config(function($mdThemingProvider) {
5 | /* For more info, visit https://material.angularjs.org/#/Theming/01_introduction */
6 | $mdThemingProvider.theme('default')
7 | .primaryPalette('indigo')
8 | .accentPalette('grey')
9 | .warnPalette('red');
10 | });
11 |
12 | })();
13 |
--------------------------------------------------------------------------------
/angular/dialogs/add_users/add_users.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/angular/dialogs/add_users/add_users.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.controllers').controller('AddUsersCtrl', function($scope, DialogService){
5 |
6 | $scope.save = function(){
7 | //do something useful
8 | DialogService.hide();
9 | };
10 |
11 | $scope.hide = function(){
12 | DialogService.hide();
13 | };
14 |
15 | });
16 |
17 | })();
18 |
--------------------------------------------------------------------------------
/angular/directives/data_listing/data_listing.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/angular/directives/data_listing/data_listing.html
--------------------------------------------------------------------------------
/angular/directives/data_listing/data_listing.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module( 'app.controllers' ).controller( 'DataListingCtrl', function(){
5 | //
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/angular/directives/data_listing/data_listing.less:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/angular/directives/data_listing/data_listing.less
--------------------------------------------------------------------------------
/angular/directives/data_listing/definition.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.directives').directive( 'dataListing', function() {
5 |
6 | return {
7 | restrict: 'EA',
8 | templateUrl: 'views/directives/data_listing/data_listing.html',
9 | controller: 'DataListingCtrl',
10 | link: function( $scope, element, $attrs ){
11 | //
12 | }
13 | };
14 |
15 | });
16 |
17 | })();
18 |
--------------------------------------------------------------------------------
/angular/filters/capitalize.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.filters').filter( 'capitalize', function(){
5 | return function(input, all) {
6 | return (!!input) ? input.replace(/([^\W_]+[^\s-]*) */g,function(txt){
7 | return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
8 | }) : '';
9 | };
10 | });
11 | })();
12 |
--------------------------------------------------------------------------------
/angular/filters/human_readable.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.filters').filter( 'humanReadable', function(){
5 | return function humanize(str) {
6 | if ( !str ){
7 | return '';
8 | }
9 | var frags = str.split('_');
10 | for (var i=0; i chars) {
13 | input = input.substring(0, chars);
14 |
15 | if (!breakOnWord) {
16 | var lastspace = input.lastIndexOf(' ');
17 | // Get last space
18 | if (lastspace !== -1) {
19 | input = input.substr(0, lastspace);
20 | }
21 | } else {
22 | while (input.charAt(input.length-1) === ' ') {
23 | input = input.substr(0, input.length - 1);
24 | }
25 | }
26 | return input + '...';
27 | }
28 | return input;
29 | };
30 | });
31 | })();
--------------------------------------------------------------------------------
/angular/filters/truncate_words.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | 'use strict';
3 |
4 | angular.module('app.filters').filter('truncateWords', function () {
5 | return function (input, words) {
6 | if (isNaN(words)) {
7 | return input;
8 | }
9 | if (words <= 0) {
10 | return '';
11 | }
12 | if (input) {
13 | var inputWords = input.split(/\s+/);
14 | if (inputWords.length > words) {
15 | input = inputWords.slice(0, words).join(' ') + '...';
16 | }
17 | }
18 | return input;
19 | };
20 | });
21 | })();
--------------------------------------------------------------------------------
/angular/filters/trust_html.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.filters').filter( 'trustHtml', function( $sce ){
5 | return function( html ){
6 | return $sce.trustAsHtml(html);
7 | };
8 | });
9 | })();
--------------------------------------------------------------------------------
/angular/filters/ucfirst.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.filters').filter('ucfirst', function() {
5 | return function( input ) {
6 | if ( !input ){
7 | return null;
8 | }
9 | return input.substring(0, 1).toUpperCase() + input.substring(1);
10 | };
11 | });
12 |
13 | })();
14 |
--------------------------------------------------------------------------------
/angular/main.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | var app = angular.module('app',
5 | [
6 | 'app.controllers',
7 | 'app.filters',
8 | 'app.services',
9 | 'app.directives',
10 | 'app.routes',
11 | 'app.config'
12 | ]);
13 |
14 |
15 | angular.module('app.routes', ['ui.router', 'ngStorage', 'satellizer']);
16 | angular.module('app.controllers', ['ui.router', 'ngMaterial', 'ngStorage', 'restangular', 'ngMdIcons', 'angular-loading-bar']);
17 | angular.module('app.filters', []);
18 | angular.module('app.services', ['ui.router', 'ngStorage', 'restangular']);
19 | angular.module('app.directives', []);
20 | angular.module('app.config', []);
21 |
22 | })();
--------------------------------------------------------------------------------
/angular/material/page.less:
--------------------------------------------------------------------------------
1 | body {
2 | background: #f2f2f2;
3 | }
4 |
5 | // https://github.com/angular/material/issues/2914
6 | md-input-container {
7 | .md-input {
8 | border-style: solid;
9 | }
10 | }
11 |
12 | .Page {
13 | background: transparent;
14 |
15 | .Page-Container {
16 | background: transparent;
17 | padding: 8px 16px;
18 |
19 | md-card {
20 | width: 940px;
21 |
22 | md-toolbar:first-child {
23 | border-radius: 3px 3px 0 0;
24 | }
25 |
26 | md-card-content.language-markup {
27 | padding: 8px 0 0 0;
28 | }
29 |
30 | md-card-content {
31 | li {
32 | line-height: 26px;
33 | }
34 | }
35 |
36 | // Responsive break point for cards.
37 | @media (max-width: 1240px) {
38 | width: 100%;
39 | }
40 | }
41 |
42 | pre[class*="language-"] {
43 | border-radius: 0;
44 | margin-bottom: 0;
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/angular/material/toast.less:
--------------------------------------------------------------------------------
1 | md-toast[md-theme=warn]{
2 | background-color: #F44336;
3 | border-radius: 2px;
4 | }
--------------------------------------------------------------------------------
/angular/material/transitions.less:
--------------------------------------------------------------------------------
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.less:
--------------------------------------------------------------------------------
1 | .u-center{
2 | text-align: center;
3 | }
4 |
--------------------------------------------------------------------------------
/angular/routes.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.routes').config(function($stateProvider, $urlRouterProvider){
5 |
6 | var getView = function(viewName){
7 | return './views/app/' + viewName + '/' + viewName + '.html';
8 | };
9 |
10 | $urlRouterProvider.otherwise('/');
11 |
12 | $stateProvider
13 | .state('app', {
14 | abstract: true,
15 | views: {
16 | sidebar: {
17 | templateUrl: getView('sidebar')
18 | },
19 | header: {
20 | templateUrl: getView('header')
21 | },
22 | main: {}
23 | }
24 | })
25 | .state('app.landing', {
26 | url: '/',
27 | data: {pageName: 'Overview'},
28 | views: {
29 | 'main@': {
30 | templateUrl: getView('landing')
31 | }
32 | }
33 | })
34 | .state('app.install', {
35 | url: '/install',
36 | data: {pageName: 'Install'},
37 | views: {
38 | 'main@': {
39 | templateUrl: getView('install')
40 | }
41 | }
42 | })
43 | .state('app.tabs', {
44 | url: '/features',
45 | data: {pageName: 'Features'},
46 | views: {
47 | 'main@': {
48 | templateUrl: getView('tabs')
49 | }
50 | }
51 | })
52 | .state('app.deploy', {
53 | url: '/deploy',
54 | data: {pageName: 'Deploy'},
55 | views: {
56 | 'main@': {
57 | templateUrl: getView('deploy')
58 | }
59 | }
60 | })
61 | .state('app.theme', {
62 | url: '/theme',
63 | data: {pageName: 'Theme'},
64 | views: {
65 | 'main@': {
66 | templateUrl: getView('theme')
67 | }
68 | }
69 | })
70 | .state('app.toasts', {
71 | url: '/toasts',
72 | data: {pageName: 'Toasts'},
73 | views: {
74 | 'main@': {
75 | templateUrl: getView('toasts')
76 | }
77 | }
78 | })
79 | .state('app.dialogs', {
80 | url: '/dialogs',
81 | data: {pageName: 'Dialogs'},
82 | views: {
83 | 'main@': {
84 | templateUrl: getView('dialogs')
85 | }
86 | }
87 | })
88 | .state('app.generators', {
89 | url: '/generators',
90 | data: {pageName: 'Artisan generators'},
91 | views: {
92 | 'main@': {
93 | templateUrl: getView('generators')
94 | }
95 | }
96 | })
97 | .state('app.jwt_auth', {
98 | url: '/jwt_auth',
99 | data: {pageName: 'JSON Web Token Authentication'},
100 | views: {
101 | 'main@': {
102 | templateUrl: getView('jwt_auth')
103 | }
104 | }
105 | })
106 | .state('app.elixir', {
107 | url: '/elixir',
108 | data: {pageName: 'Elixir'},
109 | views: {
110 | 'main@': {
111 | templateUrl: getView('elixir')
112 | }
113 | }
114 | })
115 | .state('app.rest_api', {
116 | url: '/rest_api',
117 | data: {pageName: 'REST API'},
118 | views: {
119 | 'main@': {
120 | templateUrl: getView('rest_api')
121 | }
122 | }
123 | })
124 | .state('app.unsupported_browser', {
125 | url: '/unsupported_browser',
126 | data: {pageName: 'Unsupported Browser'},
127 | views: {
128 | 'main@': {
129 | templateUrl: getView('unsupported_browser')
130 | }
131 | }
132 | })
133 | .state('app.misc', {
134 | url: '/misc',
135 | data: {pageName: 'Miscellaneous features'},
136 | views: {
137 | 'main@': {
138 | templateUrl: getView('misc')
139 | }
140 | }
141 | });
142 |
143 |
144 | });
145 | })();
146 |
--------------------------------------------------------------------------------
/angular/routes.run.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.routes').run(function($rootScope, $mdSidenav){
5 | $rootScope.$on("$stateChangeStart", function(event, toState){
6 |
7 | if (toState.data && toState.data.pageName){
8 | $rootScope.current_page = toState.data.pageName;
9 | }
10 |
11 |
12 | });
13 | $rootScope.$on("$viewContentLoaded", function(event, toState){
14 | window.Prism.highlightAll();
15 | });
16 |
17 | $rootScope.$on("$stateChangeSuccess", function(event, toState){
18 | $mdSidenav('left').close();
19 | });
20 | });
21 |
22 | })();
23 |
--------------------------------------------------------------------------------
/angular/services/dialog.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module("app.services").factory('DialogService', function($mdDialog){
5 |
6 | return {
7 | fromTemplate: function(template, $scope){
8 |
9 | var options = {
10 | templateUrl: './views/dialogs/' + template + '/' + template + '.html'
11 | };
12 |
13 | if ($scope){
14 | options.scope = $scope.$new();
15 | }
16 |
17 | return $mdDialog.show(options);
18 | },
19 |
20 | hide: function(){
21 | return $mdDialog.hide();
22 | },
23 |
24 | alert: function(title, content){
25 | $mdDialog.show(
26 | $mdDialog.alert()
27 | .title(title)
28 | .content(content)
29 | .ok('Ok')
30 | );
31 | }
32 | };
33 | });
34 | })();
--------------------------------------------------------------------------------
/angular/services/toast.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module("app.services").factory('ToastService', function($mdToast){
5 |
6 | var delay = 6000,
7 | position = 'top right',
8 | action = 'OK';
9 |
10 | return {
11 | show: function(content){
12 | if (!content){
13 | return false;
14 | }
15 |
16 | return $mdToast.show(
17 | $mdToast.simple()
18 | .content(content)
19 | .position(position)
20 | .action(action)
21 | .hideDelay(delay)
22 | );
23 | },
24 | error: function(content){
25 | if (!content){
26 | return false;
27 | }
28 |
29 | return $mdToast.show(
30 | $mdToast.simple()
31 | .content(content)
32 | .position(position)
33 | .theme('warn')
34 | .action(action)
35 | .hideDelay(delay)
36 | );
37 | }
38 | };
39 | });
40 | })();
--------------------------------------------------------------------------------
/app/Console/Commands/AngularConfig.php:
--------------------------------------------------------------------------------
1 | argument('name');
38 |
39 | $js = file_get_contents(__DIR__.'/Stubs/AngularConfig/config.js.stub');
40 |
41 | $folder = __DIR__.'/../../../angular/config/';
42 |
43 | //create config (.js)
44 | File::put($folder.'/'.$name.'.js', $js);
45 |
46 | $this->info('Config created successfully.');
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Console/Commands/AngularDialog.php:
--------------------------------------------------------------------------------
1 | argument('name');
42 | $studly_name = studly_case($name);
43 | $human_readable = ucfirst(str_replace('_', ' ', $name));
44 |
45 | $html = file_get_contents(__DIR__.'/Stubs/AngularDialog/dialog.html.stub');
46 | $js = file_get_contents(__DIR__.'/Stubs/AngularDialog/dialog.js.stub');
47 |
48 | $html = str_replace('{{StudlyName}}', $studly_name, $html);
49 | $js = str_replace('{{StudlyName}}', $studly_name, $js);
50 | $html = str_replace('{{HumanReadableName}}', $human_readable, $html);
51 |
52 | $folder = __DIR__.'/../../../angular/dialogs/'.$name;
53 | if (is_dir($folder)) {
54 | $this->info('Folder already exists');
55 |
56 | return false;
57 | }
58 |
59 | //create folder
60 | File::makeDirectory($folder, 0775, true);
61 |
62 | //create view (.html)
63 | File::put($folder.'/'.$name.'.html', $html);
64 |
65 | //create controller (.js)
66 | File::put($folder.'/'.$name.'.js', $js);
67 |
68 | $this->info('Dialog created successfully.');
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/Console/Commands/AngularDirective.php:
--------------------------------------------------------------------------------
1 | argument('name');
42 | $studly_name = studly_case($name);
43 | $directive_name = strtolower(substr($studly_name, 0, 1)).substr($studly_name, 1);
44 |
45 | $html = file_get_contents(__DIR__.'/Stubs/AngularDirective/directive.html.stub');
46 | $js = file_get_contents(__DIR__.'/Stubs/AngularDirective/directive.js.stub');
47 | $definition = file_get_contents(__DIR__.'/Stubs/AngularDirective/definition.js.stub');
48 | $less = file_get_contents(__DIR__.'/Stubs/AngularDirective/directive.less.stub');
49 |
50 | $js = str_replace('{{StudlyName}}', $studly_name, $js);
51 | $definition = str_replace('{{StudlyName}}', $studly_name, $definition);
52 | $definition = str_replace('{{name}}', $name, $definition);
53 | $definition = str_replace('{{directiveName}}', $directive_name, $definition);
54 |
55 | $folder = __DIR__.'/../../../angular/directives/'.$name;
56 | if (is_dir($folder)) {
57 | $this->info('Folder already exists');
58 |
59 | return false;
60 | }
61 |
62 | //create folder
63 | File::makeDirectory($folder, 0775, true);
64 |
65 | //create view (.html)
66 | File::put($folder.'/'.$name.'.html', $html);
67 |
68 | //create definition (.js)
69 | File::put($folder.'/definition.js', $definition);
70 |
71 | //create controller (.js)
72 | File::put($folder.'/'.$name.'.js', $js);
73 |
74 | //create less file (.less)
75 | File::put($folder.'/'.$name.'.less', $less);
76 |
77 | $this->info('Directive created successfully.');
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/Console/Commands/AngularFeature.php:
--------------------------------------------------------------------------------
1 | argument('name');
38 | $studly_name = studly_case($name);
39 |
40 | $html = file_get_contents(__DIR__.'/Stubs/AngularFeature/feature.html.stub');
41 | $js = file_get_contents(__DIR__.'/Stubs/AngularFeature/feature.js.stub');
42 | $less = file_get_contents(__DIR__.'/Stubs/AngularFeature/feature.less.stub');
43 |
44 | $html = str_replace('{{StudlyName}}', $studly_name, $html);
45 | $js = str_replace('{{StudlyName}}', $studly_name, $js);
46 |
47 | $folder = __DIR__.'/../../../angular/app/'.$name;
48 | if (is_dir($folder)) {
49 | $this->info('Folder already exists');
50 |
51 | return false;
52 | }
53 |
54 | //create folder
55 | File::makeDirectory($folder, 0775, true);
56 |
57 | //create view (.html)
58 | File::put($folder.'/'.$name.'.html', $html);
59 |
60 | //create controller (.js)
61 | File::put($folder.'/'.$name.'.js', $js);
62 |
63 | //create less file (.less)
64 | File::put($folder.'/'.$name.'.less', $less);
65 |
66 | $this->info('Feature created successfully.');
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/Console/Commands/AngularFilter.php:
--------------------------------------------------------------------------------
1 | argument('name');
38 | $studly_name = studly_case($name);
39 |
40 | $js = file_get_contents(__DIR__.'/Stubs/AngularFilter/filter.js.stub');
41 |
42 | $js = str_replace('{{StudlyName}}', $studly_name, $js);
43 |
44 | $folder = __DIR__.'/../../../angular/filters/';
45 |
46 | //create filter (.js)
47 | File::put($folder.'/'.$name.'.js', $js);
48 |
49 | $this->info('Filter created successfully.');
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/Console/Commands/AngularService.php:
--------------------------------------------------------------------------------
1 | argument('name');
38 | $studly_name = studly_case($name);
39 |
40 | $js = file_get_contents(__DIR__.'/Stubs/AngularService/service.js.stub');
41 |
42 | $js = str_replace('{{StudlyName}}', $studly_name, $js);
43 |
44 | $folder = __DIR__.'/../../../angular/services/';
45 |
46 | //create service (.js)
47 | File::put($folder.'/'.$name.'.js', $js);
48 |
49 | $this->info('Service created successfully.');
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/Console/Commands/Inspire.php:
--------------------------------------------------------------------------------
1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularConfig/config.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.config').config(function(){
5 | //
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularDialog/dialog.html.stub:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularDialog/dialog.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.controllers').controller('{{StudlyName}}Ctrl', function($scope, DialogService){
5 |
6 | $scope.save = function(){
7 | //
8 | };
9 |
10 | $scope.hide = function(){
11 | DialogService.hide();
12 | };
13 |
14 | });
15 |
16 | })();
17 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularDirective/definition.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.directives').directive( '{{directiveName}}', function() {
5 |
6 | return {
7 | restrict: 'EA',
8 | templateUrl: 'views/directives/{{name}}/{{name}}.html',
9 | controller: '{{StudlyName}}Ctrl',
10 | link: function( $scope, element, $attrs ){
11 | //
12 | }
13 | };
14 |
15 | });
16 |
17 | })();
18 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularDirective/directive.html.stub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/app/Console/Commands/Stubs/AngularDirective/directive.html.stub
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularDirective/directive.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module( 'app.controllers' ).controller( '{{StudlyName}}Ctrl', function(){
5 | //
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularDirective/directive.less.stub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/app/Console/Commands/Stubs/AngularDirective/directive.less.stub
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularFeature/feature.html.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularFeature/feature.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.controllers').controller('{{StudlyName}}Ctrl', function(){
5 | //
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularFeature/feature.less.stub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/app/Console/Commands/Stubs/AngularFeature/feature.less.stub
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularFilter/filter.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.filters').filter( '{{StudlyName}}', function(){
5 | return function( input ){
6 | //
7 | }
8 | });
9 |
10 | })();
11 |
--------------------------------------------------------------------------------
/app/Console/Commands/Stubs/AngularService/service.js.stub:
--------------------------------------------------------------------------------
1 | (function(){
2 | "use strict";
3 |
4 | angular.module('app.services').factory('{{StudlyName}}Service', function(){
5 | //
6 | });
7 |
8 | })();
9 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
34 | ->hourly();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Events/Event.php:
--------------------------------------------------------------------------------
1 | middleware('guest', ['except' => 'getLogout']);
35 | }
36 |
37 | /**
38 | * Get a validator for an incoming registration request.
39 | *
40 | * @param array $data
41 | * @return \Illuminate\Contracts\Validation\Validator
42 | */
43 | public function validator(array $data)
44 | {
45 | return Validator::make($data, [
46 | 'name' => 'required|max:255',
47 | 'email' => 'required|email|max:255|unique:users',
48 | 'password' => 'required|confirmed|min:6',
49 | ]);
50 | }
51 |
52 | /**
53 | * Create a new user instance after a valid registration.
54 | *
55 | * @param array $data
56 | * @return User
57 | */
58 | public function create(array $data)
59 | {
60 | return User::create([
61 | 'name' => $data['name'],
62 | 'email' => $data['email'],
63 | 'password' => bcrypt($data['password']),
64 | ]);
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/PasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Http/Controllers/AuthenticateController.php:
--------------------------------------------------------------------------------
1 | middleware('jwt.auth', ['except' => ['postAuth']]);
14 | }
15 |
16 | /**
17 | * Display a listing of the resource.
18 | * @return Response
19 | */
20 | public function getData()
21 | {
22 | //auth protected data
23 | return ['auth', 'protected', 'data'];
24 | }
25 |
26 | public function postAuth(Request $request)
27 | {
28 | $credentials = $request->only('email', 'password');
29 |
30 | try {
31 | // verify the credentials and create a token for the user
32 | if (! $token = JWTAuth::attempt($credentials)) {
33 | return response()->json(['error' => 'invalid_credentials'], 401);
34 | }
35 | } catch (JWTException $e) {
36 | // something went wrong
37 | return response()->json(['error' => 'could_not_create_token'], 500);
38 | }
39 |
40 | // if no errors are encountered we can return a JWT
41 | return response()->api(compact('token'));
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | getValidationFactory()->make($request->all(), $rules, $messages, $customAttributes);
19 |
20 | if ($validator->fails()) {
21 | throw new ValidationHttpException($validator->errors());
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Http/Controllers/HomeController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
26 | }
27 |
28 | /**
29 | * Show the application dashboard to the user.
30 | *
31 | * @return Response
32 | */
33 | public function index()
34 | {
35 | return view('home');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/Http/Controllers/WelcomeController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
26 | }
27 |
28 | /**
29 | * Show the application welcome screen to the user.
30 | *
31 | * @return Response
32 | */
33 | public function index()
34 | {
35 | return view('welcome');
36 | }
37 |
38 | public function sample()
39 | {
40 | $data = ['sample', 'api', 'call', 'with', 'laravel', 'and', 'restangular'];
41 |
42 | return response()->api($data);
43 | }
44 |
45 | public function getSample()
46 | {
47 | return response()->api('success');
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | 'App\Http\Middleware\Authenticate',
30 | 'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
31 | 'guest' => 'App\Http\Middleware\RedirectIfAuthenticated',
32 | 'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
33 | 'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
34 | ];
35 | }
36 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | auth = $auth;
26 | }
27 |
28 | /**
29 | * Handle an incoming request.
30 | *
31 | * @param \Illuminate\Http\Request $request
32 | * @param \Closure $next
33 | * @return mixed
34 | */
35 | public function handle($request, Closure $next)
36 | {
37 | if ($this->auth->guest()) {
38 | if ($request->ajax()) {
39 | return response('Unauthorized.', 401);
40 | } else {
41 | return redirect()->guest('auth/login');
42 | }
43 | }
44 |
45 | return $next($request);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | auth = $auth;
27 | }
28 |
29 | /**
30 | * Handle an incoming request.
31 | *
32 | * @param \Illuminate\Http\Request $request
33 | * @param \Closure $next
34 | * @return mixed
35 | */
36 | public function handle($request, Closure $next)
37 | {
38 | if ($this->auth->check()) {
39 | return new RedirectResponse(url('/home'));
40 | }
41 |
42 | return $next($request);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | version('v1', function ($api) {
21 | /*
22 | * used for Json Web Token Authentication - https://scotch.io/tutorials/token-based-authentication-for-angularjs-and-laravel-apps
23 | * Make sure to re-enable CSRF middleware if you're disabling JWT
24 | */
25 | $api->controller('authenticate', 'App\Http\Controllers\AuthenticateController');
26 |
27 | $api->get('test', 'App\Http\Controllers\WelcomeController@getSample');
28 | });
29 |
30 | //protected with JWT
31 | $api->version('v1', ['middleware' => 'api.auth'], function ($api) {
32 |
33 | $api->post('test/sample', 'App\Http\Controllers\WelcomeController@sample');
34 |
35 | });
36 |
--------------------------------------------------------------------------------
/app/Jobs/Job.php:
--------------------------------------------------------------------------------
1 | app->bind(
31 | 'Illuminate\Contracts\Auth\Registrar',
32 | 'App\Services\Registrar'
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/Providers/AuthServiceProvider.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 | parent::registerPolicies($gate);
28 |
29 | //
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Providers/BusServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapUsing(function ($command) {
19 | return Dispatcher::simpleMapping(
20 | $command, 'App\Commands', 'App\Handlers\Commands'
21 | );
22 | });
23 | }
24 |
25 | /**
26 | * Register any application services.
27 | *
28 | * @return void
29 | */
30 | public function register()
31 | {
32 | //
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Providers/ConfigServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | '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 | $data]);
19 | });
20 | }
21 |
22 | /**
23 | * Register the application services.
24 | *
25 | * @return void
26 | */
27 | public function register()
28 | {
29 | //
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | group(['namespace' => $this->namespace], function ($router) {
41 | require app_path('Http/routes.php');
42 | });
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | make('Illuminate\Contracts\Console\Kernel');
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',
31 | 'App\Http\Kernel'
32 | );
33 |
34 | $app->singleton(
35 | 'Illuminate\Contracts\Console\Kernel',
36 | 'App\Console\Kernel'
37 | );
38 |
39 | $app->singleton(
40 | 'Illuminate\Contracts\Debug\ExceptionHandler',
41 | 'App\Exceptions\Handler'
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 | "angular": "~1.4",
15 | "angular-ui-router": "~0.2.15",
16 | "ngstorage": "~0.3.3",
17 | "angular-material": "~0.10.1",
18 | "restangular": "~1.5.1",
19 | "svg-morpheus": "~0.1.8",
20 | "angular-material-icons": "~0.5.0",
21 | "satellizer": "~0.11.2",
22 | "angular-loading-bar": "~0.8.0"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/code_of_conduct.md:
--------------------------------------------------------------------------------
1 | # Contributor Code of Conduct
2 |
3 | As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4 |
5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6 |
7 | Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8 |
9 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10 |
11 | This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
12 |
13 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
14 |
15 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.1.0, available at [http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/)
16 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jadjoubran/laravel5-angular-material-starter",
3 | "description": "Laravel 5 angular material starter project with elixir setup",
4 | "keywords": ["laravel", "angular", "material", "starter", "ui-router", "api"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=5.5.9",
9 | "laravel/framework": "5.1.*",
10 | "barryvdh/laravel-debugbar": "~2.0",
11 | "tymon/jwt-auth": "0.5.*",
12 | "dingo/api": "1.0.x@dev"
13 | },
14 | "require-dev": {
15 | "fzaninotto/faker": "~1.4",
16 | "mockery/mockery": "0.9.*",
17 | "phpunit/phpunit": "~4.0",
18 | "phpspec/phpspec": "~2.1"
19 | },
20 | "autoload": {
21 | "classmap": [
22 | "database"
23 | ],
24 | "psr-4": {
25 | "App\\": "app/"
26 | }
27 | },
28 | "autoload-dev": {
29 | "classmap": [
30 | "tests/TestCase.php"
31 | ]
32 | },
33 | "scripts": {
34 | "post-install-cmd": [
35 | "php artisan clear-compiled",
36 | "php artisan optimize"
37 | ],
38 | "post-update-cmd": [
39 | "php artisan clear-compiled",
40 | "php artisan optimize"
41 | ],
42 | "post-create-project-cmd": [
43 | "php -r \"copy('.env.example', '.env');\"",
44 | "php -r \"unlink('code_of_conduct.md');\"",
45 | "php -r \"unlink('CHANGELOG.md');\"",
46 | "php -r \"unlink('.codeclimate.yml');\"",
47 | "php -r \"unlink('.travis.yml');\"",
48 | "php artisan key:generate",
49 | "php artisan jwt:generate"
50 | ]
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | 'eloquent',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Authentication Model
23 | |--------------------------------------------------------------------------
24 | |
25 | | When using the "Eloquent" authentication driver, we need to know which
26 | | Eloquent model should be used to retrieve your users. Of course, it
27 | | is often just the "User" model but you may use whatever you like.
28 | |
29 | */
30 |
31 | 'model' => 'App\User',
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Authentication Table
36 | |--------------------------------------------------------------------------
37 | |
38 | | When using the "Database" authentication driver, we need to know which
39 | | table should be used to retrieve your users. We have chosen a basic
40 | | default value but you may easily change it to any table you like.
41 | |
42 | */
43 |
44 | 'table' => 'users',
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Password Reset Settings
49 | |--------------------------------------------------------------------------
50 | |
51 | | Here you may set the options for resetting passwords including the view
52 | | that is your password reset e-mail. You can also set the name of the
53 | | table that maintains all of the reset tokens for your application.
54 | |
55 | | The expire time is the number of minutes that the reset token should be
56 | | considered valid. This security feature keeps tokens short-lived so
57 | | they have less time to be guessed. You may change this as needed.
58 | |
59 | */
60 |
61 | 'password' => [
62 | 'email' => 'emails.password',
63 | 'table' => 'password_resets',
64 | 'expire' => 60,
65 | ],
66 |
67 | ];
68 |
--------------------------------------------------------------------------------
/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' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
55 | ],
56 | ],
57 | ],
58 |
59 | 'redis' => [
60 | 'driver' => 'redis',
61 | 'connection' => 'default',
62 | ],
63 |
64 | ],
65 |
66 | /*
67 | |--------------------------------------------------------------------------
68 | | Cache Key Prefix
69 | |--------------------------------------------------------------------------
70 | |
71 | | When utilizing a RAM based store such as APC or Memcached, there might
72 | | be other applications utilizing the same cache. So, we'll specify a
73 | | value to get prefixed to all our keys so we can avoid collisions.
74 | |
75 | */
76 |
77 | 'prefix' => 'laravel',
78 |
79 | ];
80 |
--------------------------------------------------------------------------------
/config/compile.php:
--------------------------------------------------------------------------------
1 | [
17 |
18 | realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'),
19 | realpath(__DIR__.'/../app/Providers/BusServiceProvider.php'),
20 | realpath(__DIR__.'/../app/Providers/ConfigServiceProvider.php'),
21 | realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'),
22 | realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'),
23 |
24 | ],
25 |
26 | /*
27 | |--------------------------------------------------------------------------
28 | | Compiled File Providers
29 | |--------------------------------------------------------------------------
30 | |
31 | | Here you may list service providers which define a "compiles" function
32 | | that returns additional files that should be compiled, providing an
33 | | easy way to get common files from any packages you are utilizing.
34 | |
35 | */
36 |
37 | 'providers' => [
38 | //
39 | ],
40 |
41 | ];
42 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | PDO::FETCH_CLASS,
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Database Connection Name
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may specify which of the database connections below you wish
24 | | to use as your default connection for all database work. Of course
25 | | you may use many connections at once using the Database library.
26 | |
27 | */
28 |
29 | 'default' => 'mysql',
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Database Connections
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here are each of the database connections setup for your application.
37 | | Of course, examples of configuring each database platform that is
38 | | supported by Laravel is shown below to make development simple.
39 | |
40 | |
41 | | All database work in Laravel is done through the PHP PDO facilities
42 | | so make sure you have the driver for your particular database of
43 | | choice installed on your machine before you begin development.
44 | |
45 | */
46 |
47 | 'connections' => [
48 |
49 | 'sqlite' => [
50 | 'driver' => 'sqlite',
51 | 'database' => storage_path().'/database.sqlite',
52 | 'prefix' => '',
53 | ],
54 |
55 | 'mysql' => [
56 | 'driver' => 'mysql',
57 | 'host' => env('DB_HOST', 'localhost'),
58 | 'database' => env('DB_DATABASE', 'forge'),
59 | 'username' => env('DB_USERNAME', 'forge'),
60 | 'password' => env('DB_PASSWORD', ''),
61 | 'charset' => 'utf8',
62 | 'collation' => 'utf8_unicode_ci',
63 | 'prefix' => '',
64 | 'strict' => false,
65 | ],
66 |
67 | 'pgsql' => [
68 | 'driver' => 'pgsql',
69 | 'host' => env('DB_HOST', 'localhost'),
70 | 'database' => env('DB_DATABASE', 'forge'),
71 | 'username' => env('DB_USERNAME', 'forge'),
72 | 'password' => env('DB_PASSWORD', ''),
73 | 'charset' => 'utf8',
74 | 'prefix' => '',
75 | 'schema' => 'public',
76 | ],
77 |
78 | 'sqlsrv' => [
79 | 'driver' => 'sqlsrv',
80 | 'host' => env('DB_HOST', 'localhost'),
81 | 'database' => env('DB_DATABASE', 'forge'),
82 | 'username' => env('DB_USERNAME', 'forge'),
83 | 'password' => env('DB_PASSWORD', ''),
84 | 'prefix' => '',
85 | ],
86 |
87 | ],
88 |
89 | /*
90 | |--------------------------------------------------------------------------
91 | | Migration Repository Table
92 | |--------------------------------------------------------------------------
93 | |
94 | | This table keeps track of all the migrations that have already run for
95 | | your application. Using this information, we can determine which of
96 | | the migrations on disk haven't actually been run in the database.
97 | |
98 | */
99 |
100 | 'migrations' => 'migrations',
101 |
102 | /*
103 | |--------------------------------------------------------------------------
104 | | Redis Databases
105 | |--------------------------------------------------------------------------
106 | |
107 | | Redis is an open source, fast, and advanced key-value store that also
108 | | provides a richer set of commands than a typical key-value systems
109 | | such as APC or Memcached. Laravel makes it easy to dig right in.
110 | |
111 | */
112 |
113 | 'redis' => [
114 |
115 | 'cluster' => false,
116 |
117 | 'default' => [
118 | 'host' => '127.0.0.1',
119 | 'port' => 6379,
120 | 'database' => 0,
121 | ],
122 |
123 | ],
124 |
125 | ];
126 |
--------------------------------------------------------------------------------
/config/entrust.php:
--------------------------------------------------------------------------------
1 | 'App\Role',
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Entrust Roles Table
26 | |--------------------------------------------------------------------------
27 | |
28 | | This is the roles table used by Entrust to save roles to the database.
29 | |
30 | */
31 | 'roles_table' => 'roles',
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Entrust Permission Model
36 | |--------------------------------------------------------------------------
37 | |
38 | | This is the Permission model used by Entrust to create correct relations.
39 | | Update the permission if it is in a different namespace.
40 | |
41 | */
42 | 'permission' => 'App\Permission',
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Entrust Permissions Table
47 | |--------------------------------------------------------------------------
48 | |
49 | | This is the permissions table used by Entrust to save permissions to the
50 | | database.
51 | |
52 | */
53 | 'permissions_table' => 'permissions',
54 |
55 | /*
56 | |--------------------------------------------------------------------------
57 | | Entrust permission_role Table
58 | |--------------------------------------------------------------------------
59 | |
60 | | This is the permission_role table used by Entrust to save relationship
61 | | between permissions and roles to the database.
62 | |
63 | */
64 | 'permission_role_table' => 'permission_role',
65 |
66 | /*
67 | |--------------------------------------------------------------------------
68 | | Entrust role_user Table
69 | |--------------------------------------------------------------------------
70 | |
71 | | This is the role_user table used by Entrust to save assigned roles to the
72 | | database.
73 | |
74 | */
75 | 'role_user_table' => 'role_user',
76 |
77 | ];
78 |
--------------------------------------------------------------------------------
/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 | 's3' => [
52 | 'driver' => 's3',
53 | 'key' => 'your-key',
54 | 'secret' => 'your-secret',
55 | 'region' => 'your-region',
56 | 'bucket' => 'your-bucket',
57 | ],
58 |
59 | 'rackspace' => [
60 | 'driver' => 'rackspace',
61 | 'username' => 'your-username',
62 | 'key' => 'your-key',
63 | 'container' => 'your-container',
64 | 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
65 | 'region' => 'IAD',
66 | 'url_type' => 'publicURL',
67 | ],
68 |
69 | ],
70 |
71 | ];
72 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | SMTP Host Address
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may provide the host address of the SMTP server used by your
26 | | applications. A default option is provided that is compatible with
27 | | the Mailgun mail service which will provide reliable deliveries.
28 | |
29 | */
30 |
31 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | SMTP Host Port
36 | |--------------------------------------------------------------------------
37 | |
38 | | This is the SMTP port used by your application to deliver e-mails to
39 | | users of the application. Like the host we have set this value to
40 | | stay compatible with the Mailgun e-mail application by default.
41 | |
42 | */
43 |
44 | 'port' => env('MAIL_PORT', 587),
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Global "From" Address
49 | |--------------------------------------------------------------------------
50 | |
51 | | You may wish for all e-mails sent by your application to be sent from
52 | | the same address. Here, you may specify a name and address that is
53 | | used globally for all e-mails that are sent by your application.
54 | |
55 | */
56 |
57 | 'from' => ['address' => null, 'name' => null],
58 |
59 | /*
60 | |--------------------------------------------------------------------------
61 | | E-Mail Encryption Protocol
62 | |--------------------------------------------------------------------------
63 | |
64 | | Here you may specify the encryption protocol that should be used when
65 | | the application send e-mail messages. A sensible default using the
66 | | transport layer security protocol should provide great security.
67 | |
68 | */
69 |
70 | 'encryption' => 'tls',
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | SMTP Server Username
75 | |--------------------------------------------------------------------------
76 | |
77 | | If your SMTP server requires a username for authentication, you should
78 | | set it here. This will get used to authenticate with your server on
79 | | connection. You may also set the "password" value below this one.
80 | |
81 | */
82 |
83 | 'username' => env('MAIL_USERNAME'),
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | SMTP Server Password
88 | |--------------------------------------------------------------------------
89 | |
90 | | Here you may set the password required by your SMTP server to send out
91 | | messages from your application. This will be given to the server on
92 | | connection so that the application will be able to send messages.
93 | |
94 | */
95 |
96 | 'password' => env('MAIL_PASSWORD'),
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Sendmail System Path
101 | |--------------------------------------------------------------------------
102 | |
103 | | When using the "sendmail" driver to send e-mails, we will need to know
104 | | the path to where Sendmail lives on this server. A default path has
105 | | been provided here, which will work well on most of your systems.
106 | |
107 | */
108 |
109 | 'sendmail' => '/usr/sbin/sendmail -bs',
110 |
111 | /*
112 | |--------------------------------------------------------------------------
113 | | Mail "Pretend"
114 | |--------------------------------------------------------------------------
115 | |
116 | | When this option is enabled, e-mail will not actually be sent over the
117 | | web and will instead be written to your application's logs files so
118 | | you may inspect the message. This is great for local development.
119 | |
120 | */
121 |
122 | 'pretend' => false,
123 |
124 | ];
125 |
--------------------------------------------------------------------------------
/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 | 'queue' => 'your-queue-url',
57 | 'region' => 'us-east-1',
58 | ],
59 |
60 | 'iron' => [
61 | 'driver' => 'iron',
62 | 'host' => 'mq-aws-us-east-1.iron.io',
63 | 'token' => 'your-token',
64 | 'project' => 'your-project-id',
65 | 'queue' => 'your-queue-name',
66 | 'encrypt' => true,
67 | ],
68 |
69 | 'redis' => [
70 | 'driver' => 'redis',
71 | 'queue' => 'default',
72 | 'expire' => 60,
73 | ],
74 |
75 | ],
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Failed Queue Jobs
80 | |--------------------------------------------------------------------------
81 | |
82 | | These options configure the behavior of failed queue job logging so you
83 | | can control which database and table are used to store the jobs that
84 | | have failed. You may change them to any database / table you wish.
85 | |
86 | */
87 |
88 | 'failed' => [
89 | 'database' => 'mysql', 'table' => 'failed_jobs',
90 | ],
91 |
92 | ];
93 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => '',
19 | 'secret' => '',
20 | ],
21 |
22 | 'mandrill' => [
23 | 'secret' => '',
24 | ],
25 |
26 | 'ses' => [
27 | 'key' => '',
28 | 'secret' => '',
29 | 'region' => 'us-east-1',
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => 'App\User',
34 | 'secret' => '',
35 | ],
36 |
37 | ];
38 |
--------------------------------------------------------------------------------
/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/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/database/migrations/.gitkeep
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name');
18 | $table->string('email')->unique();
19 | $table->string('password', 60);
20 | $table->rememberToken();
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::drop('users');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/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/seeds/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/database/seeds/.gitkeep
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call('UserTableSeeder');
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | #ssh to your server here
4 | git pull
5 | composer install --no-dev
6 | php artisan migrate --force
7 | php artisan route:cache
8 | php artisan config:cache
9 | php artisan optimize
10 |
--------------------------------------------------------------------------------
/elixir.json:
--------------------------------------------------------------------------------
1 | {
2 | "js": {
3 | "outputFolder": "public/js"
4 | },
5 | "css": {
6 | "outputFolder": "public/css",
7 | "less": {
8 | "folder": "../../angular/"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var elixir = require('laravel-elixir');
2 | require('./tasks/angular.task.js');
3 | require('./tasks/bower.task.js');
4 | require('laravel-elixir-livereload');
5 |
6 |
7 | /*
8 | |--------------------------------------------------------------------------
9 | | Elixir Asset Management
10 | |--------------------------------------------------------------------------
11 | |
12 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks
13 | | for your Laravel application. By default, we are compiling the Less
14 | | file for our application, as well as publishing vendor resources.
15 | |
16 | */
17 |
18 | elixir(function(mix){
19 | mix
20 | .bower()
21 | .angular('./angular/')
22 | .less('./angular/**/*.less', 'public/css')
23 | .copy('./angular/app/**/*.html', 'public/views/app/')
24 | .copy('./angular/directives/**/*.html', 'public/views/directives/')
25 | .copy('./angular/dialogs/**/*.html', 'public/views/dialogs/')
26 | .livereload([
27 | 'public/js/vendor.js',
28 | 'public/js/app.js',
29 | 'public/css/vendor.css',
30 | 'public/css/app.css',
31 | 'public/views/**/*.html'
32 | ], {liveCSS: true})
33 | .phpUnit();
34 | });
35 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "gulp-concat": "^2.6.0",
4 | "gulp-concat-sourcemap": "^1.3.1",
5 | "gulp-filter": "^1.0.2",
6 | "gulp-if": "^1.2.5",
7 | "gulp-jshint": "^1.9.0",
8 | "gulp-minify-css": "^0.3.11",
9 | "gulp-ng-annotate": "^1",
10 | "gulp-notify": "^2.0.0",
11 | "gulp-sourcemaps": "^1",
12 | "gulp-uglify": "^1",
13 | "jshint-stylish": "^2",
14 | "laravel-elixir": "^3.0.0",
15 | "laravel-elixir-livereload": "^1.1.1",
16 | "main-bower-files": "^2.1.0"
17 | },
18 | "devDependencies": {
19 | "gulp": "^3.9.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/phpspec.yml:
--------------------------------------------------------------------------------
1 | suites:
2 | main:
3 | namespace: App
4 | psr4_prefix: App
5 | src_path: app
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | ./tests/
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | RewriteCond %{HTTP:Authorization} ^(.*)
9 | RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
10 |
11 | # Redirect Trailing Slashes...
12 | RewriteRule ^(.*)/$ /$1 [L,R=301]
13 |
14 | # Handle Front Controller...
15 | RewriteCond %{REQUEST_FILENAME} !-d
16 | RewriteCond %{REQUEST_FILENAME} !-f
17 | RewriteRule ^ index.php [L]
18 |
19 |
--------------------------------------------------------------------------------
/public/css/app.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: #f2f2f2;
3 | }
4 | md-input-container .md-input {
5 | border-style: solid;
6 | }
7 | .Page {
8 | background: transparent;
9 | }
10 | .Page .Page-Container {
11 | background: transparent;
12 | padding: 8px 16px;
13 | }
14 | .Page .Page-Container md-card {
15 | width: 940px;
16 | }
17 | .Page .Page-Container md-card md-toolbar:first-child {
18 | border-radius: 3px 3px 0 0;
19 | }
20 | .Page .Page-Container md-card md-card-content.language-markup {
21 | padding: 8px 0 0 0;
22 | }
23 | .Page .Page-Container md-card md-card-content li {
24 | line-height: 26px;
25 | }
26 | @media (max-width: 1240px) {
27 | .Page .Page-Container md-card {
28 | width: 100%;
29 | }
30 | }
31 | .Page .Page-Container pre[class*="language-"] {
32 | border-radius: 0;
33 | margin-bottom: 0;
34 | }
35 |
36 | md-toast[md-theme=warn] {
37 | background-color: #F44336;
38 | border-radius: 2px;
39 | }
40 |
41 | [ui-view].ng-enter,
42 | [ui-view].ng-leave {
43 | transition: opacity ease-in-out 200ms;
44 | }
45 | [ui-view].ng-enter,
46 | [ui-view].ng-leave.ng-leave-active {
47 | opacity: 0;
48 | }
49 | [ui-view].ng-enter.ng-enter-active {
50 | opacity: 1;
51 | }
52 | .Page.ng-leave.ng-leave-active {
53 | display: none;
54 | }
55 |
56 | .u-center {
57 | text-align: center;
58 | }
59 |
60 | .Header {
61 | z-index: 3;
62 | }
63 | .Header button:first-child {
64 | padding-top: 6px;
65 | }
66 |
67 | .Landing-CallToAction {
68 | text-align: center;
69 | }
70 | .Landing-flex {
71 | min-height: 50px;
72 | padding: 5px;
73 | color: white;
74 | }
75 | .Landing-flex33 {
76 | background-color: #009688;
77 | }
78 | .Landing-flex55 {
79 | background-color: #3949ab;
80 | }
81 | .Landing-flexRemaining {
82 | background-color: #9c27b0;
83 | }
84 | .Landing-demoIcon {
85 | fill: #009688;
86 | position: relative;
87 | top: 4px;
88 | left: 5px;
89 | }
90 |
91 | .Sidebar {
92 | background-color: #3f51b5;
93 | white-space: nowrap;
94 | }
95 | .Sidebar,
96 | .Sidebar.md-locked-open-add-active,
97 | .Sidebar.md-locked-open {
98 | width: 250px;
99 | min-width: 250px;
100 | max-width: 250px;
101 | }
102 | .Sidebar-header {
103 | min-height: inherit;
104 | }
105 | .Sidebar-title {
106 | font-size: 25px;
107 | height: 100px;
108 | max-height: 100px;
109 | text-align: center;
110 | font-weight: 500;
111 | }
112 | .Sidebar-pages {
113 | background-color: #3f51b5;
114 | color: white;
115 | }
116 | .Sidebar-pages md-list md-list-item button.md-button:not([disabled]):hover {
117 | background-color: rgba(158, 158, 158, 0.2) !important;
118 | }
119 | .Sidebar-page {
120 | cursor: pointer;
121 | }
122 | .Sidebar-page md-list-item {
123 | /*IE centering fix*/
124 | height: 48px;
125 | }
126 | .Sidebar-page.active {
127 | background-color: rgba(158, 158, 158, 0.3) !important;
128 | }
129 | .Sidebar-version {
130 | margin: 0 0 20px 0;
131 | text-align: center;
132 | font-weight: normal;
133 | }
134 | .Sidebar-version a {
135 | color: white;
136 | }
137 |
138 |
139 | /*# sourceMappingURL=app.css.map */
--------------------------------------------------------------------------------
/public/css/prism.css:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+less+php&plugins=line-numbers+show-language */
2 | /**
3 | * okaidia theme for JavaScript, CSS and HTML
4 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/
5 | * @author ocodia
6 | */
7 |
8 | code[class*="language-"],
9 | pre[class*="language-"] {
10 | color: #f8f8f2;
11 | text-shadow: 0 1px rgba(0, 0, 0, 0.3);
12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13 | direction: ltr;
14 | text-align: left;
15 | white-space: pre;
16 | word-spacing: normal;
17 | word-break: normal;
18 | line-height: 1.5;
19 |
20 | -moz-tab-size: 4;
21 | -o-tab-size: 4;
22 | tab-size: 4;
23 |
24 | -webkit-hyphens: none;
25 | -moz-hyphens: none;
26 | -ms-hyphens: none;
27 | hyphens: none;
28 | }
29 |
30 | /* Code blocks */
31 | pre[class*="language-"] {
32 | padding: 1em;
33 | margin: .5em 0;
34 | overflow: auto;
35 | border-radius: 0.3em;
36 | }
37 |
38 | :not(pre) > code[class*="language-"],
39 | pre[class*="language-"] {
40 | background: #272822;
41 | }
42 |
43 | /* Inline code */
44 | :not(pre) > code[class*="language-"] {
45 | padding: .1em;
46 | border-radius: .3em;
47 | }
48 |
49 | .token.comment,
50 | .token.prolog,
51 | .token.doctype,
52 | .token.cdata {
53 | color: slategray;
54 | }
55 |
56 | .token.punctuation {
57 | color: #f8f8f2;
58 | }
59 |
60 | .namespace {
61 | opacity: .7;
62 | }
63 |
64 | .token.property,
65 | .token.tag,
66 | .token.constant,
67 | .token.symbol,
68 | .token.deleted {
69 | color: #f92672;
70 | }
71 |
72 | .token.boolean,
73 | .token.number {
74 | color: #ae81ff;
75 | }
76 |
77 | .token.selector,
78 | .token.attr-name,
79 | .token.string,
80 | .token.char,
81 | .token.builtin,
82 | .token.inserted {
83 | color: #a6e22e;
84 | }
85 |
86 | .token.operator,
87 | .token.entity,
88 | .token.url,
89 | .language-css .token.string,
90 | .style .token.string,
91 | .token.variable {
92 | color: #f8f8f2;
93 | }
94 |
95 | .token.atrule,
96 | .token.attr-value,
97 | .token.function {
98 | color: #e6db74;
99 | }
100 |
101 | .token.keyword {
102 | color: #66d9ef;
103 | }
104 |
105 | .token.regex,
106 | .token.important {
107 | color: #fd971f;
108 | }
109 |
110 | .token.important,
111 | .token.bold {
112 | font-weight: bold;
113 | }
114 | .token.italic {
115 | font-style: italic;
116 | }
117 |
118 | .token.entity {
119 | cursor: help;
120 | }
121 |
122 | pre.line-numbers {
123 | position: relative;
124 | padding-left: 3.8em;
125 | counter-reset: linenumber;
126 | }
127 |
128 | pre.line-numbers > code {
129 | position: relative;
130 | }
131 |
132 | .line-numbers .line-numbers-rows {
133 | position: absolute;
134 | pointer-events: none;
135 | top: 0;
136 | font-size: 100%;
137 | left: -3.8em;
138 | width: 3em; /* works for line-numbers below 1000 lines */
139 | letter-spacing: -1px;
140 | border-right: 1px solid #999;
141 |
142 | -webkit-user-select: none;
143 | -moz-user-select: none;
144 | -ms-user-select: none;
145 | user-select: none;
146 |
147 | }
148 |
149 | .line-numbers-rows > span {
150 | pointer-events: none;
151 | display: block;
152 | counter-increment: linenumber;
153 | }
154 |
155 | .line-numbers-rows > span:before {
156 | content: counter(linenumber);
157 | color: #999;
158 | display: block;
159 | padding-right: 0.8em;
160 | text-align: right;
161 | }
162 | pre[class*='language-'] {
163 | position: relative;
164 | }
165 | pre[class*='language-'][data-language]::before {
166 | content: attr(data-language);
167 | color: black;
168 | background-color: #CFCFCF;
169 | display: inline-block;
170 | position: absolute;
171 | top: 0;
172 | right: 0;
173 | font-size: 0.9em;
174 | border-radius: 0 0 0 5px;
175 | padding: 0 0.5em;
176 | text-shadow: none;
177 | }
178 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sitepoint-editors/laravel5-angular-material-starter/1c4182d0455247ce1d3fd5cff64a04d5084d0804/public/favicon.ico
--------------------------------------------------------------------------------
/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');
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/views/app/dashboard/dashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Laravel 5
7 |
8 |
9 | The Laravel 5.1 that you loved, comes pre-configured to run with AngularJS:
10 |
11 |
JWT Authentication
12 |
A view (resources/index.blade.php) that loads all the assets you need (CSS and JS) &
13 | sets up angular ui-router
14 |
15 |
Support for CSRF token when using the API
16 |
Debugbar for
17 | Laravel 5: It's that bar you see at the bottom. Very useful for debugging the API
18 |
19 |
Sample API endpoints
20 |
Elixir configuration for Angular, jshint, bower and views.
21 |
Optimized deployment script.
22 |
API response macro
23 |
24 |
25 |
26 |
27 |
28 |
29 |
AngularJS
30 |
31 |
32 | AngularJS comes ready to communicate with the Laravel 5 API that you're building. It actually
33 | comes with a few sample API endpoints!
34 | This is what you have out of the box:
35 |
36 |
A flexible and powerful router for Angular: ui-router
38 |
Restangular makes
39 | communicating with the API a breeze!
40 |
41 |
Support for CSRF token via Restangular
42 |
43 |
Sample UI router with multiple views (main & footer)
44 |
UI Router sample authentication
45 |
ngstorage module which simplifies access to localStorage.. The Angular way!
46 |
Angular Material Icons with SVG morpheus
47 |
48 |
49 |
50 |
51 |
52 |
53 |
Angular Material
54 |
55 |
56 | Material Design as a UI library! Chosen instead of bootstrap in order to avoid injecting jQuery
57 | with Angular.
58 | Here's what you'll get:
59 |
60 |
Sample Landing and Dashboard pages design with Material Design
61 |
Custom Material Design theme so that you can easily create your own theme
12 | DialogService.alert('This is an alert title', 'You can specify some description text in here.');
13 |
14 | //use artisan ng:dialog add_users
15 | //$scope is optional. You'll be able to use $scope.$parent from within the dialog's controller
16 | DialogService.fromTemplate('add_users', $scope);
17 |
18 |
19 |
20 |
21 | DialogService
22 | can be extended to suit your needs.
23 |
19 | dingo/api package is meant to provide you, with a set of tools to help you easily and quickly build your own API. dingo/api works out of the box in Laravel angular material starter.
20 | Feel free to check their wiki to customize it.
21 | dingo/api is configured to work harmoniously with JWT-auth.
22 |
12 | The Laravel 5.1 that you loved, comes pre-configured to run with AngularJS:
13 |
14 |
15 |
JWT Authentication
16 |
A view (resources/index.blade.php) that loads all the assets you need (CSS and JS) &
17 | sets up angular ui-router
18 |
19 |
Support for CSRF token when using the API
20 |
Debugbar for
21 | Laravel 5: It's that bar you see at the bottom. Very useful for debugging the API
22 |
23 |
Sample API endpoints
24 |
Elixir configuration for Angular, jshint, bower and views.
25 |
Optimized deployment script.
26 |
API response macro
27 |
28 |
29 |
30 |
31 |
32 |
33 |
AngularJS
34 |
35 |
36 | AngularJS comes ready to communicate with the Laravel 5 API that you're building. It
37 | actually
38 | comes with a few sample API endpoints!
39 |
40 |
41 | This is what you have out of the box:
42 |
43 |
44 |
A flexible and powerful router for Angular: ui-router
46 |
Restangular makes
47 | communicating with the API a breeze!
48 |
49 |
Support for CSRF token via Restangular
50 |
51 |
Sample UI router with multiple views (main & footer)
52 |
UI Router sample authentication
53 |
ngstorage module which simplifies access to localStorage.. The Angular way!
54 |
Angular Material Icons with SVG morpheus
55 |
56 |
57 |
58 |
59 |
60 |
61 |
Angular Material
62 |
63 |
64 | Material Design as a UI library!
65 |
66 |
67 | Here's what you'll get:
68 |
69 |
70 |
Sample Landing and Dashboard pages design with Material Design
71 |
Custom Material Design theme so that you can easily create your own theme