├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ └── ResetPasswordController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ └── VueItemController.php │ ├── Kernel.php │ └── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ └── VerifyCsrfToken.php ├── Item.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ └── 2017_05_12_105436_create_items_table.php └── seeds │ └── DatabaseSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ ├── app.css │ ├── custom.css │ ├── f5-forms.css │ └── toastr.min.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ ├── foundation.min.js │ ├── jquery.min.js │ └── toastr.min.js ├── mix-manifest.json ├── mix.js ├── robots.txt └── web.config ├── resources ├── assets │ ├── js │ │ ├── app.js │ │ ├── bootstrap.js │ │ └── components │ │ │ ├── Crud.vue │ │ │ └── Example.vue │ └── sass │ │ └── app.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── home.blade.php │ ├── layouts │ └── app.blade.php │ ├── manage-vue.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── screencapture-laravel-vue-foundation-simple-CRUD.png ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── techstack.md ├── techstack.yml ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL=http://localhost 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST=127.0.0.1 10 | DB_PORT=3306 11 | DB_DATABASE=homestead 12 | DB_USERNAME=homestead 13 | DB_PASSWORD=secret 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | SESSION_DRIVER=file 18 | QUEUE_DRIVER=sync 19 | 20 | REDIS_HOST=127.0.0.1 21 | REDIS_PASSWORD=null 22 | REDIS_PORT=6379 23 | 24 | MAIL_DRIVER=smtp 25 | MAIL_HOST=smtp.mailtrap.io 26 | MAIL_PORT=2525 27 | MAIL_USERNAME=null 28 | MAIL_PASSWORD=null 29 | MAIL_ENCRYPTION=null 30 | 31 | PUSHER_APP_ID= 32 | PUSHER_APP_KEY= 33 | PUSHER_APP_SECRET= 34 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | /.vagrant 8 | Homestead.json 9 | Homestead.yaml 10 | npm-debug.log 11 | .env 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # laravel-vue-foundation-simple-CRUD 2 | A Simple Item Create/Read/Update/Delete (CRUD) Application created using Laravel 5.4, Vue.js 2.3.3, Foundation 6.3, Axios and Toastr 2.1 with composer and npm package or dependency management. 3 | 4 | So, I came across this tutorial [Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch](http://itsolutionstuff.com/post/laravel-5-and-vue-js-crud-with-pagination-example-and-demo-from-scratchexample.html). After I got the Item CRUD app working, I thought of redoing it with some packages managed by composer, which Laravel mostly utilises, and use Zurb Foundation, instead of Bootstrap, which Laravel utilises straight out of the box. Also, in the link I shared, the author makes use of Vue.js version 1 and Vue-resource for making web requests and handle responses. In this approach, I use Vue.js version 2 and Axios for making web requests and handling responses. Vue and Axios are managed by npm, while the rest of the dependencies are managed by composer. 5 | 6 | This is the journey to make the image below happen. 7 | ![screencapture-laravel-vue-foundation-simple-CRUD.png](screencapture-laravel-vue-foundation-simple-CRUD.png) 8 | 9 | I developed this using Uniserver Zero XIII 13.3.2; Apache Server (PHP 7.1.1), MySQL and the Server Console. Firstly, you install composer and then get your Apache and MySQL running, then launch the server console to install Laravel and the other dependencies. Below are the steps taken: 10 | 11 | 1. Install Laravel in folder named 'laravel-vue-foundation-simple-CRUD' 12 | ```cmd 13 | composer create-project --prefer-dist laravel/laravel laravel-vue-foundation-simple-CRUD 14 | ``` 15 | 2. Create authenication scaffolding for the app 16 | ```cmd 17 | php artisan make:auth 18 | ``` 19 | 3. Create database migration for the items table 20 | ```cmd 21 | php artisan make:migration create_items_table --create=items 22 | ``` 23 | 4. EDIT: database\migrations\*_create_users_table.php 24 | Change name to username 25 | ```php 26 | ... 27 | $table->string('username'); 28 | ... 29 | ``` 30 | 5. EDIT: config\app.php 31 | Give your app a name and make any other necessary configs 32 | ```php 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Application Name 36 | |-------------------------------------------------------------------------- 37 | | 38 | | This value is the name of your application. This value is used when the 39 | | framework needs to place the application's name in a notification or 40 | | any other location as required by the application or its packages. 41 | */ 42 | 43 | 'name' => env('APP_NAME', 'Simple CRUD'), 44 | ``` 45 | database.php 46 | ```php 47 | 'strict' => false, 48 | 'engine' => 'InnoDB', 49 | ``` 50 | 6. EDIT: laravel-vue-foundation\.env 51 | Modify with details relevant to your database 52 | ```php 53 | DB_CONNECTION=mysql 54 | DB_HOST=127.0.0.1 55 | DB_PORT=3306 56 | DB_DATABASE=laravel-vue-foundtn 57 | DB_USERNAME=**** 58 | DB_PASSWORD=******** 59 | ``` 60 | 7. At this point you can run your migration to create database table 61 | ```cmd 62 | php artisan migrate 63 | ``` 64 | But you will get the following error: 65 | ```cmd 66 | [Illuminate\Database\QueryException] 67 | SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) 68 | ``` 69 | 8. So, to solve the above error. EDIT: app\Providers\AppServiceProvider.php 70 | Add: 71 | ```php 72 | use Illuminate\Support\Facades\Schema; 73 | ``` 74 | Then modify boot as follows: 75 | ```php 76 | public function boot() 77 | { 78 | Schema::defaultStringLength(191); 79 | } 80 | ``` 81 | 9. If the migration failed, some tables were created in your database, so first go ahead and delete all tables, then run migration again 82 | ```cmd 83 | php artisan migrate 84 | ``` 85 | 10. To avoid compiling errors later on due to version mismatch, we'll uninstall and reinstall some packages that might be outdated using npm. 86 | ```cmd 87 | npm uninstall axios --save-dev 88 | npm uninstall bootstrap-sass --save-dev 89 | npm uninstall cross-env --save-dev 90 | npm uninstall jquery --save-dev 91 | npm uninstall vue --save-dev 92 | 93 | npm install axios --save-dev 94 | npm install cross-env --save-dev 95 | npm install vue --save-dev 96 | npm update 97 | ``` 98 | Also, we'll install some packages using composer. 99 | ```cmd 100 | composer require components/jquery 101 | composer require grimmlink/toastr 102 | composer require zurb/foundation 103 | composer update 104 | ``` 105 | 11. Create the Item model using the following command: 106 | ```cmd 107 | php artisan make:model Item 108 | ``` 109 | 12. EDIT: app\Item.php model as follows: 110 | ```php 111 | middleware('auth'); 145 | } 146 | /** 147 | * Manage vue items. 148 | * 149 | * @return \Illuminate\Http\Response 150 | */ 151 | public function manageVue() 152 | { 153 | return view('manage-vue'); 154 | } 155 | /** 156 | * Display a listing of the resource. 157 | * 158 | * @return \Illuminate\Http\Response 159 | */ 160 | public function index(Request $request) 161 | { 162 | $items = Item::latest()->paginate(5); 163 | 164 | $response = [ 165 | 'pagination' => [ 166 | 'total' => $items->total(), 167 | 'per_page' => $items->perPage(), 168 | 'current_page' => $items->currentPage(), 169 | 'last_page' => $items->lastPage(), 170 | 'from' => $items->firstItem(), 171 | 'to' => $items->lastItem(), 172 | ], 173 | 'data' => $items 174 | ]; 175 | 176 | return response()->json($response); 177 | } 178 | 179 | /** 180 | * Store a newly created resource in storage. 181 | * 182 | * @param \Illuminate\Http\Request $request 183 | * @return \Illuminate\Http\Response 184 | */ 185 | public function store(Request $request) 186 | { 187 | $this->validate($request, [ 188 | 'title' => 'required', 189 | 'description' => 'required', 190 | ]); 191 | 192 | $create = Item::create($request->all()); 193 | 194 | return response()->json($create); 195 | } 196 | 197 | /** 198 | * Update the specified resource in storage. 199 | * 200 | * @param \Illuminate\Http\Request $request 201 | * @param int $id 202 | * @return \Illuminate\Http\Response 203 | */ 204 | public function update(Request $request, $item) 205 | { 206 | $this->validate($request, [ 207 | 'title' => 'required', 208 | 'description' => 'required', 209 | ]); 210 | 211 | $edit = Item::find($item)->update($request->all()); 212 | 213 | return response()->json($edit); 214 | } 215 | 216 | /** 217 | * Remove the specified resource from storage. 218 | * 219 | * @param \App\Item $item 220 | * @return \Illuminate\Http\Response 221 | */ 222 | public function destroy($item) 223 | { 224 | Item::find($item)->delete(); 225 | return response()->json(['done']); 226 | } 227 | } 228 | ``` 229 | 15. EDIT: app\Http\Controllers\Auth\LoginController.php 230 | ```php 231 | middleware('guest')->except('logout'); 268 | } 269 | } 270 | ``` 271 | RegisterController.php 272 | ```php 273 | middleware('guest'); 312 | } 313 | 314 | /** 315 | * Get a validator for an incoming registration request. 316 | * 317 | * @param array $data 318 | * @return \Illuminate\Contracts\Validation\Validator 319 | */ 320 | protected function validator(array $data) 321 | { 322 | return Validator::make($data, [ 323 | 'username' => 'required|string|max:255', 324 | 'email' => 'required|string|email|max:255|unique:users', 325 | 'password' => 'required|string|min:6|confirmed', 326 | ]); 327 | } 328 | 329 | /** 330 | * Create a new user instance after a valid registration. 331 | * 332 | * @param array $data 333 | * @return User 334 | */ 335 | protected function create(array $data) 336 | { 337 | return User::create([ 338 | 'username' => $data['username'], 339 | 'email' => $data['email'], 340 | 'password' => bcrypt($data['password']), 341 | ]); 342 | } 343 | } 344 | ``` 345 | 16. EDIT: routes\web.php 346 | ```php 347 | 'manage-vue', 'uses' => 'VueItemController@manageVue')); 367 | Route::resource('vueitems', 'VueItemController'); 368 | ``` 369 | 17. DELETE: resources\assets\sass\_variables.scss and then EDIT: resources\assets\sass\app.scss as follows: 370 | ```php 371 | // Fonts 372 | @import url(http://fonts.googleapis.com/css?family=Open+Sans); 373 | 374 | // Settings 375 | @import "vendor/zurb/foundation/scss/settings/settings"; 376 | 377 | // Foundation 378 | @import "vendor/zurb/foundation/scss/foundation"; 379 | 380 | // Everything 381 | @include foundation-global-styles; 382 | @include foundation-grid; 383 | @include foundation-typography; 384 | @include foundation-forms; 385 | @include foundation-button; 386 | @include foundation-accordion; 387 | @include foundation-accordion-menu; 388 | @include foundation-badge; 389 | @include foundation-breadcrumbs; 390 | @include foundation-button-group; 391 | @include foundation-callout; 392 | @include foundation-card; 393 | @include foundation-close-button; 394 | @include foundation-menu; 395 | @include foundation-menu-icon; 396 | @include foundation-drilldown-menu; 397 | @include foundation-dropdown; 398 | @include foundation-dropdown-menu; 399 | @include foundation-responsive-embed; 400 | @include foundation-label; 401 | @include foundation-media-object; 402 | @include foundation-off-canvas; 403 | @include foundation-orbit; 404 | @include foundation-pagination; 405 | @include foundation-progress-bar; 406 | @include foundation-slider; 407 | @include foundation-sticky; 408 | @include foundation-reveal; 409 | @include foundation-switch; 410 | @include foundation-table; 411 | @include foundation-tabs; 412 | @include foundation-thumbnail; 413 | @include foundation-title-bar; 414 | @include foundation-tooltip; 415 | @include foundation-top-bar; 416 | @include foundation-visibility-classes; 417 | @include foundation-float-classes; 418 | ``` 419 | 18. EDIT: vendor\zurb\foundation\scss\settings\_settings.scss 420 | Line 44 421 | ```php 422 | @import '../util/util'; 423 | ``` 424 | 19. EDIT: laravel-vue-foundation\resources\assets\js\app.js 425 | ```php 426 | /** 427 | * First we will load all of this project's JavaScript dependencies which 428 | * includes Vue and other libraries. It is a great starting point when 429 | * building robust, powerful web applications using Vue and Laravel. 430 | */ 431 | 432 | require('./bootstrap'); 433 | 434 | /** 435 | * Next, we will create a fresh Vue application instance and attach it to 436 | * the page. Then, you may begin adding components to this application 437 | * or customize the JavaScript scaffolding to fit your unique needs. 438 | */ 439 | 440 | Vue.component('example', require('./components/Crud.vue')); 441 | 442 | const app = new Vue({ 443 | el: '#manage-vue' 444 | }); 445 | ``` 446 | bootstrap.js 447 | ```php 448 | window._ = require('lodash'); 449 | 450 | /** 451 | * Vue is a modern JavaScript library for building interactive web interfaces 452 | * using reactive data binding and reusable components. Vue's API is clean 453 | * and simple, leaving you to focus on building your next great project. 454 | */ 455 | 456 | window.Vue = require('vue'); 457 | 458 | /** 459 | * We'll load the axios HTTP library which allows us to easily issue requests 460 | * to our Laravel back-end. This library automatically handles sending the 461 | * CSRF token as a header based on the value of the "XSRF" token cookie. 462 | */ 463 | 464 | window.axios = require('axios'); 465 | 466 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken; 467 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 468 | ``` 469 | 20. CREATE: resources\assets\js\components\Crud.vue 470 | ```php 471 | 568 | 569 | 670 | ``` 671 | 21. EDIT: webpack.mix.js 672 | ```php 673 | const { mix } = require('laravel-mix'); 674 | 675 | /* 676 | |-------------------------------------------------------------------------- 677 | | Mix Asset Management 678 | |-------------------------------------------------------------------------- 679 | | 680 | | Mix provides a clean, fluent API for defining some Webpack build steps 681 | | for your Laravel application. By default, we are compiling the Sass 682 | | file for the application as well as bundling up all the JS files. 683 | | 684 | */ 685 | 686 | mix.sass('resources/assets/sass/app.scss', 'public/css') 687 | .js('resources/assets/js/app.js', 'public/js'); 688 | mix.copy('vendor/components/jquery/jquery.min.js', 'public/js'); 689 | mix.copy('vendor/zurb/foundation/dist/js/foundation.min.js', 'public/js'); 690 | mix.copy('vendor/grimmlink/toastr/build/toastr.min.css', 'public/css'); 691 | mix.copy('vendor/grimmlink/toastr/build/toastr.min.js', 'public/js'); 692 | ``` 693 | 22. Then run npm run dev to compile once OR npm run watch if you'll be making frequent changes to javascript code, this way, changes will be monitored and system will automatically recompile your components each time they are modified. 694 | 695 | 23. CREATE: resources\views\manage-vue.blade.php 696 | ```php 697 | @extends('layouts.app') 698 | 699 | @section('content') 700 |
701 |
702 | 703 |
704 | 705 |
706 | @endsection 707 | 708 | ``` 709 | 24. EDIT: resources\views\layouts\app.blade.php 710 | ```php 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | {{ config('app.name', 'Vue') }} 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 |
734 |
735 |
736 | 737 | 738 | 739 | 740 | {{ config('app.name') }} 741 |
742 |
743 |
744 | 747 |
748 |
749 | 750 | 776 |
777 |
778 |
779 |
780 | 781 |
782 | @yield('content') 783 |
784 | 785 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | ``` 803 | 25. EDIT: resources\views\auth\login.blade.php 804 | ```php 805 | @extends('layouts.app') 806 | 807 | @section('content') 808 |
809 |
810 |

Login

811 |
812 | {{ csrf_field() }} 813 | 814 | 815 |
816 |
817 |
818 | Username 819 |
820 |
821 | 822 |
823 |
824 | @if (count($errors) > 0) 825 | @foreach ($errors->get('email') as $error) 826 | {{ $error }} 827 | @endforeach 828 | @endif 829 |
830 | 831 | 832 |
833 |
834 |
835 | Password 836 |
837 |
838 | 839 |
840 |
841 | @if (count($errors) > 0) 842 | @foreach ($errors->get('password') as $error) 843 | {{ $error }} 844 | @endforeach 845 | @endif 846 |
847 | 848 |
849 | 850 |
851 | 852 |
853 | 854 | Forgot Your Password? 855 |
856 |
857 |
858 |
859 | @endsection 860 | ``` 861 | auth\register.blade.php 862 | ```php 863 | @extends('layouts.app') 864 | 865 | @section('content') 866 |
867 |
868 |

Register

869 |
870 |
871 | {{ csrf_field() }} 872 | 873 | 874 |
875 |
876 |
877 | Username 878 |
879 |
880 | 881 |
882 |
883 | @if (count($errors) > 0) 884 | @foreach ($errors->get('username') as $error) 885 | {{ $error }} 886 | @endforeach 887 | @endif 888 |
889 | 890 | 891 |
892 |
893 |
894 | e-Mail Address 895 |
896 |
897 | 898 |
899 |
900 | @if (count($errors) > 0) 901 | @foreach ($errors->get('email') as $error) 902 | {{ $error }} 903 | @endforeach 904 | @endif 905 |
906 | 907 | 908 |
909 |
910 |
911 | Password 912 |
913 |
914 | 915 |
916 |
917 | @if (count($errors) > 0) 918 | @foreach ($errors->get('password') as $error) 919 | {{ $error }} 920 | @endforeach 921 | @endif 922 |
923 | 924 | 925 |
926 |
927 |
928 | Password Confirm 929 |
930 |
931 | 932 |
933 |
934 | @if (count($errors) > 0) 935 | @foreach ($errors->get('password-confirm') as $error) 936 | {{ $error }} 937 | @endforeach 938 | @endif 939 |
940 | 941 |
942 | 943 |
944 |
945 |
946 |
947 |
948 | @endsection 949 | ``` 950 | = THE END = 951 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the Closure based commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | require base_path('routes/console.php'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 60 | return response()->json(['error' => 'Unauthenticated.'], 401); 61 | } 62 | 63 | return redirect()->guest(route('login')); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'username' => 'required|string|max:255', 52 | 'email' => 'required|string|email|max:255|unique:users', 53 | 'password' => 'required|string|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'username' => $data['username'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Http\Response 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/VueItemController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 18 | } 19 | /** 20 | * Manage vue items. 21 | * 22 | * @return \Illuminate\Http\Response 23 | */ 24 | public function manageVue() 25 | { 26 | return view('manage-vue'); 27 | } 28 | /** 29 | * Display a listing of the resource. 30 | * 31 | * @return \Illuminate\Http\Response 32 | */ 33 | public function index(Request $request) 34 | { 35 | $items = Item::latest()->paginate(5); 36 | 37 | $response = [ 38 | 'pagination' => [ 39 | 'total' => $items->total(), 40 | 'per_page' => $items->perPage(), 41 | 'current_page' => $items->currentPage(), 42 | 'last_page' => $items->lastPage(), 43 | 'from' => $items->firstItem(), 44 | 'to' => $items->lastItem(), 45 | ], 46 | 'data' => $items 47 | ]; 48 | 49 | return response()->json($response); 50 | } 51 | 52 | /** 53 | * Show the form for creating a new resource. 54 | * 55 | * @return \Illuminate\Http\Response 56 | */ 57 | public function create() 58 | { 59 | // 60 | } 61 | 62 | /** 63 | * Store a newly created resource in storage. 64 | * 65 | * @param \Illuminate\Http\Request $request 66 | * @return \Illuminate\Http\Response 67 | */ 68 | public function store(Request $request) 69 | { 70 | $this->validate($request, [ 71 | 'title' => 'required', 72 | 'description' => 'required', 73 | ]); 74 | 75 | $create = Item::create($request->all()); 76 | 77 | return response()->json($create); 78 | } 79 | 80 | /** 81 | * Display the specified resource. 82 | * 83 | * @param int $id 84 | * @return \Illuminate\Http\Response 85 | */ 86 | public function show($id) 87 | { 88 | // 89 | } 90 | 91 | /** 92 | * Show the form for editing the specified resource. 93 | * 94 | * @param int $id 95 | * @return \Illuminate\Http\Response 96 | */ 97 | public function edit($id) 98 | { 99 | // 100 | } 101 | 102 | /** 103 | * Update the specified resource in storage. 104 | * 105 | * @param \Illuminate\Http\Request $request 106 | * @param int $id 107 | * @return \Illuminate\Http\Response 108 | */ 109 | public function update(Request $request, $item) 110 | { 111 | $this->validate($request, [ 112 | 'title' => 'required', 113 | 'description' => 'required', 114 | ]); 115 | 116 | $edit = Item::find($item)->update($request->all()); 117 | 118 | return response()->json($edit); 119 | } 120 | 121 | /** 122 | * Remove the specified resource from storage. 123 | * 124 | * @param \App\Item $item 125 | * @return \Illuminate\Http\Response 126 | */ 127 | public function destroy($item) 128 | { 129 | Item::find($item)->delete(); 130 | return response()->json(['done']); 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 30 | \App\Http\Middleware\EncryptCookies::class, 31 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 32 | \Illuminate\Session\Middleware\StartSession::class, 33 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 34 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 35 | \App\Http\Middleware\VerifyCsrfToken::class, 36 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 37 | ], 38 | 39 | 'api' => [ 40 | 'throttle:60,1', 41 | 'bindings', 42 | ], 43 | ]; 44 | 45 | /** 46 | * The application's route middleware. 47 | * 48 | * These middleware may be assigned to groups or used individually. 49 | * 50 | * @var array 51 | */ 52 | protected $routeMiddleware = [ 53 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 54 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 55 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 56 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 57 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 58 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 59 | ]; 60 | } 61 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /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.4", 9 | "components/jquery": "^3.2", 10 | "grimmlink/toastr": "^2.1", 11 | "laravel/framework": "5.4.*", 12 | "laravel/tinker": "~1.0", 13 | "zurb/foundation": "^6.3" 14 | }, 15 | "require-dev": { 16 | "fzaninotto/faker": "~1.4", 17 | "mockery/mockery": "0.9.*", 18 | "phpunit/phpunit": "~5.7" 19 | }, 20 | "autoload": { 21 | "classmap": [ 22 | "database" 23 | ], 24 | "psr-4": { 25 | "App\\": "app/" 26 | } 27 | }, 28 | "autoload-dev": { 29 | "psr-4": { 30 | "Tests\\": "tests/" 31 | } 32 | }, 33 | "scripts": { 34 | "post-root-package-install": [ 35 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 36 | ], 37 | "post-create-project-cmd": [ 38 | "php artisan key:generate" 39 | ], 40 | "post-install-cmd": [ 41 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 42 | "php artisan optimize" 43 | ], 44 | "post-update-cmd": [ 45 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 46 | "php artisan optimize" 47 | ] 48 | }, 49 | "config": { 50 | "preferred-install": "dist", 51 | "sort-packages": true, 52 | "optimize-autoloader": true 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Simple CRUD'), 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Application Environment 20 | |-------------------------------------------------------------------------- 21 | | 22 | | This value determines the "environment" your application is currently 23 | | running in. This may determine how you prefer to configure various 24 | | services your application utilizes. Set this in your ".env" file. 25 | | 26 | */ 27 | 28 | 'env' => env('APP_ENV', 'production'), 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Application Debug Mode 33 | |-------------------------------------------------------------------------- 34 | | 35 | | When your application is in debug mode, detailed error messages with 36 | | stack traces will be shown on every error that occurs within your 37 | | application. If disabled, a simple generic error page is shown. 38 | | 39 | */ 40 | 41 | 'debug' => env('APP_DEBUG', false), 42 | 43 | /* 44 | |-------------------------------------------------------------------------- 45 | | Application URL 46 | |-------------------------------------------------------------------------- 47 | | 48 | | This URL is used by the console to properly generate URLs when using 49 | | the Artisan command line tool. You should set this to the root of 50 | | your application so that it is used when running Artisan tasks. 51 | | 52 | */ 53 | 54 | 'url' => env('APP_URL', 'http://localhost'), 55 | 56 | /* 57 | |-------------------------------------------------------------------------- 58 | | Application Timezone 59 | |-------------------------------------------------------------------------- 60 | | 61 | | Here you may specify the default timezone for your application, which 62 | | will be used by the PHP date and date-time functions. We have gone 63 | | ahead and set this to a sensible default for you out of the box. 64 | | 65 | */ 66 | 67 | 'timezone' => 'UTC', 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Application Locale Configuration 72 | |-------------------------------------------------------------------------- 73 | | 74 | | The application locale determines the default locale that will be used 75 | | by the translation service provider. You are free to set this value 76 | | to any of the locales which will be supported by the application. 77 | | 78 | */ 79 | 80 | 'locale' => 'en', 81 | 82 | /* 83 | |-------------------------------------------------------------------------- 84 | | Application Fallback Locale 85 | |-------------------------------------------------------------------------- 86 | | 87 | | The fallback locale determines the locale to use when the current one 88 | | is not available. You may change the value to correspond to any of 89 | | the language folders that are provided through your application. 90 | | 91 | */ 92 | 93 | 'fallback_locale' => 'en', 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Encryption Key 98 | |-------------------------------------------------------------------------- 99 | | 100 | | This key is used by the Illuminate encrypter service and should be set 101 | | to a random, 32 character string, otherwise these encrypted strings 102 | | will not be safe. Please do this before deploying an application! 103 | | 104 | */ 105 | 106 | 'key' => env('APP_KEY'), 107 | 108 | 'cipher' => 'AES-256-CBC', 109 | 110 | /* 111 | |-------------------------------------------------------------------------- 112 | | Logging Configuration 113 | |-------------------------------------------------------------------------- 114 | | 115 | | Here you may configure the log settings for your application. Out of 116 | | the box, Laravel uses the Monolog PHP logging library. This gives 117 | | you a variety of powerful log handlers / formatters to utilize. 118 | | 119 | | Available Settings: "single", "daily", "syslog", "errorlog" 120 | | 121 | */ 122 | 123 | 'log' => env('APP_LOG', 'single'), 124 | 125 | 'log_level' => env('APP_LOG_LEVEL', 'debug'), 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Autoloaded Service Providers 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The service providers listed here will be automatically loaded on the 133 | | request to your application. Feel free to add your own services to 134 | | this array to grant expanded functionality to your applications. 135 | | 136 | */ 137 | 138 | 'providers' => [ 139 | 140 | /* 141 | * Laravel Framework Service Providers... 142 | */ 143 | Illuminate\Auth\AuthServiceProvider::class, 144 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 145 | Illuminate\Bus\BusServiceProvider::class, 146 | Illuminate\Cache\CacheServiceProvider::class, 147 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 148 | Illuminate\Cookie\CookieServiceProvider::class, 149 | Illuminate\Database\DatabaseServiceProvider::class, 150 | Illuminate\Encryption\EncryptionServiceProvider::class, 151 | Illuminate\Filesystem\FilesystemServiceProvider::class, 152 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 153 | Illuminate\Hashing\HashServiceProvider::class, 154 | Illuminate\Mail\MailServiceProvider::class, 155 | Illuminate\Notifications\NotificationServiceProvider::class, 156 | Illuminate\Pagination\PaginationServiceProvider::class, 157 | Illuminate\Pipeline\PipelineServiceProvider::class, 158 | Illuminate\Queue\QueueServiceProvider::class, 159 | Illuminate\Redis\RedisServiceProvider::class, 160 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 161 | Illuminate\Session\SessionServiceProvider::class, 162 | Illuminate\Translation\TranslationServiceProvider::class, 163 | Illuminate\Validation\ValidationServiceProvider::class, 164 | Illuminate\View\ViewServiceProvider::class, 165 | 166 | /* 167 | * Package Service Providers... 168 | */ 169 | Laravel\Tinker\TinkerServiceProvider::class, 170 | 171 | /* 172 | * Application Service Providers... 173 | */ 174 | App\Providers\AppServiceProvider::class, 175 | App\Providers\AuthServiceProvider::class, 176 | // App\Providers\BroadcastServiceProvider::class, 177 | App\Providers\EventServiceProvider::class, 178 | App\Providers\RouteServiceProvider::class, 179 | 180 | ], 181 | 182 | /* 183 | |-------------------------------------------------------------------------- 184 | | Class Aliases 185 | |-------------------------------------------------------------------------- 186 | | 187 | | This array of class aliases will be registered when this application 188 | | is started. However, feel free to register as many as you wish as 189 | | the aliases are "lazy" loaded so they don't hinder performance. 190 | | 191 | */ 192 | 193 | 'aliases' => [ 194 | 195 | 'App' => Illuminate\Support\Facades\App::class, 196 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 197 | 'Auth' => Illuminate\Support\Facades\Auth::class, 198 | 'Blade' => Illuminate\Support\Facades\Blade::class, 199 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 200 | 'Bus' => Illuminate\Support\Facades\Bus::class, 201 | 'Cache' => Illuminate\Support\Facades\Cache::class, 202 | 'Config' => Illuminate\Support\Facades\Config::class, 203 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 204 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 205 | 'DB' => Illuminate\Support\Facades\DB::class, 206 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 207 | 'Event' => Illuminate\Support\Facades\Event::class, 208 | 'File' => Illuminate\Support\Facades\File::class, 209 | 'Gate' => Illuminate\Support\Facades\Gate::class, 210 | 'Hash' => Illuminate\Support\Facades\Hash::class, 211 | 'Lang' => Illuminate\Support\Facades\Lang::class, 212 | 'Log' => Illuminate\Support\Facades\Log::class, 213 | 'Mail' => Illuminate\Support\Facades\Mail::class, 214 | 'Notification' => Illuminate\Support\Facades\Notification::class, 215 | 'Password' => Illuminate\Support\Facades\Password::class, 216 | 'Queue' => Illuminate\Support\Facades\Queue::class, 217 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 218 | 'Redis' => Illuminate\Support\Facades\Redis::class, 219 | 'Request' => Illuminate\Support\Facades\Request::class, 220 | 'Response' => Illuminate\Support\Facades\Response::class, 221 | 'Route' => Illuminate\Support\Facades\Route::class, 222 | 'Schema' => Illuminate\Support\Facades\Schema::class, 223 | 'Session' => Illuminate\Support\Facades\Session::class, 224 | 'Storage' => Illuminate\Support\Facades\Storage::class, 225 | 'URL' => Illuminate\Support\Facades\URL::class, 226 | 'Validator' => Illuminate\Support\Facades\Validator::class, 227 | 'View' => Illuminate\Support\Facades\View::class, 228 | 229 | ], 230 | 231 | ]; 232 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => false, 54 | 'engine' => 'InnoDB', 55 | ], 56 | 57 | 'pgsql' => [ 58 | 'driver' => 'pgsql', 59 | 'host' => env('DB_HOST', '127.0.0.1'), 60 | 'port' => env('DB_PORT', '5432'), 61 | 'database' => env('DB_DATABASE', 'forge'), 62 | 'username' => env('DB_USERNAME', 'forge'), 63 | 'password' => env('DB_PASSWORD', ''), 64 | 'charset' => 'utf8', 65 | 'prefix' => '', 66 | 'schema' => 'public', 67 | 'sslmode' => 'prefer', 68 | ], 69 | 70 | 'sqlsrv' => [ 71 | 'driver' => 'sqlsrv', 72 | 'host' => env('DB_HOST', 'localhost'), 73 | 'port' => env('DB_PORT', '1433'), 74 | 'database' => env('DB_DATABASE', 'forge'), 75 | 'username' => env('DB_USERNAME', 'forge'), 76 | 'password' => env('DB_PASSWORD', ''), 77 | 'charset' => 'utf8', 78 | 'prefix' => '', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'client' => 'predis', 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', '127.0.0.1'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 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 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Cache Store 91 | |-------------------------------------------------------------------------- 92 | | 93 | | When using the "apc" or "memcached" session drivers, you may specify a 94 | | cache store that should be used for these sessions. This value must 95 | | correspond with one of the application's configured cache stores. 96 | | 97 | */ 98 | 99 | 'store' => null, 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Sweeping Lottery 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Some session drivers must manually sweep their storage location to get 107 | | rid of old sessions from storage. Here are the chances that it will 108 | | happen on a given request. By default, the odds are 2 out of 100. 109 | | 110 | */ 111 | 112 | 'lottery' => [2, 100], 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Name 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Here you may change the name of the cookie used to identify a session 120 | | instance by ID. The name specified here will get used every time a 121 | | new session cookie is created by the framework for every driver. 122 | | 123 | */ 124 | 125 | 'cookie' => 'laravel_session', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Path 130 | |-------------------------------------------------------------------------- 131 | | 132 | | The session cookie path determines the path for which the cookie will 133 | | be regarded as available. Typically, this will be the root path of 134 | | your application but you are free to change this when necessary. 135 | | 136 | */ 137 | 138 | 'path' => '/', 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | Session Cookie Domain 143 | |-------------------------------------------------------------------------- 144 | | 145 | | Here you may change the domain of the cookie used to identify a session 146 | | in your application. This will determine which domains the cookie is 147 | | available to in your application. A sensible default has been set. 148 | | 149 | */ 150 | 151 | 'domain' => env('SESSION_DOMAIN', null), 152 | 153 | /* 154 | |-------------------------------------------------------------------------- 155 | | HTTPS Only Cookies 156 | |-------------------------------------------------------------------------- 157 | | 158 | | By setting this option to true, session cookies will only be sent back 159 | | to the server if the browser has a HTTPS connection. This will keep 160 | | the cookie from being sent to you if it can not be done securely. 161 | | 162 | */ 163 | 164 | 'secure' => env('SESSION_SECURE_COOKIE', false), 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | HTTP Access Only 169 | |-------------------------------------------------------------------------- 170 | | 171 | | Setting this value to true will prevent JavaScript from accessing the 172 | | value of the cookie and the cookie will only be accessible through 173 | | the HTTP protocol. You are free to modify this option if needed. 174 | | 175 | */ 176 | 177 | 'http_only' => true, 178 | 179 | ]; 180 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('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) { 16 | static $password; 17 | 18 | return [ 19 | 'name' => $faker->name, 20 | 'email' => $faker->unique()->safeEmail, 21 | 'password' => $password ?: $password = bcrypt('secret'), 22 | 'remember_token' => str_random(10), 23 | ]; 24 | }); 25 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('username'); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_05_12_105436_create_items_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('title'); 19 | $table->text('description'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('items'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.16.1", 14 | "cross-env": "^5.0.0", 15 | "laravel-mix": "0.*", 16 | "lodash": "^4.17.4", 17 | "vue": "^2.3.3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /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/css/custom.css: -------------------------------------------------------------------------------- 1 | .top-bar { 2 | position:relative; 3 | margin-bottom: 1rem; 4 | z-index: 999; 5 | } 6 | 7 | span.error { 8 | display: block; 9 | padding: 0.375rem 0.5625rem 0.5625rem; 10 | margin-top: -1px; 11 | margin-bottom: 1rem; 12 | font-size: 0.75rem; 13 | font-weight: normal; 14 | font-style: italic; 15 | background: #f04124; 16 | color: white; 17 | } 18 | 19 | .footer { 20 | background-color: #000000; 21 | padding: 0.5rem 0; 22 | } -------------------------------------------------------------------------------- /public/css/f5-forms.css: -------------------------------------------------------------------------------- 1 | /* Attach elements to the beginning or end of an input */ 2 | .prefix, 3 | .postfix { 4 | border-style: solid; 5 | border-width: 1px; 6 | display: block; 7 | font-size: 0.875rem; 8 | height: 2.3125rem; 9 | line-height: 2.3125rem; 10 | overflow: visible; 11 | padding-bottom: 0; 12 | padding-top: 0; 13 | position: relative; 14 | text-align: center; 15 | width: 100%; 16 | z-index: 2; } 17 | 18 | /* Adjust padding, alignment and radius if pre/post element is a button */ 19 | .postfix.button { 20 | border: none; 21 | padding-left: 0; 22 | padding-right: 0; 23 | padding-bottom: 0; 24 | padding-top: 0; 25 | text-align: center; } 26 | 27 | .prefix.button { 28 | border: none; 29 | padding-left: 0; 30 | padding-right: 0; 31 | padding-bottom: 0; 32 | padding-top: 0; 33 | text-align: center; } 34 | 35 | .prefix.button.radius { 36 | border-radius: 0; 37 | -webkit-border-bottom-left-radius: 3px; 38 | -webkit-border-top-left-radius: 3px; 39 | border-bottom-left-radius: 3px; 40 | border-top-left-radius: 3px; } 41 | 42 | .postfix.button.radius { 43 | border-radius: 0; 44 | -webkit-border-bottom-right-radius: 3px; 45 | -webkit-border-top-right-radius: 3px; 46 | border-bottom-right-radius: 3px; 47 | border-top-right-radius: 3px; } 48 | 49 | .prefix.button.round { 50 | border-radius: 0; 51 | -webkit-border-bottom-left-radius: 1000px; 52 | -webkit-border-top-left-radius: 1000px; 53 | border-bottom-left-radius: 1000px; 54 | border-top-left-radius: 1000px; } 55 | 56 | .postfix.button.round { 57 | border-radius: 0; 58 | -webkit-border-bottom-right-radius: 1000px; 59 | -webkit-border-top-right-radius: 1000px; 60 | border-bottom-right-radius: 1000px; 61 | border-top-right-radius: 1000px; } 62 | 63 | /* Separate prefix and postfix styles when on span or label so buttons keep their own */ 64 | span.prefix, label.prefix { 65 | background: #f2f2f2; 66 | border-right: none; 67 | color: #333333; 68 | border-color: #cccccc; } 69 | 70 | span.postfix, label.postfix { 71 | background: #f2f2f2; 72 | border-left: none; 73 | color: #333333; 74 | border-color: #cccccc; } 75 | 76 | /* We use this to get basic styling on all basic form elements */ 77 | input:not([type]), input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="color"], textarea { 78 | -webkit-appearance: none; 79 | -moz-appearance: none; 80 | border-radius: 0; 81 | background-color: #FFFFFF; 82 | border-style: solid; 83 | border-width: 1px; 84 | border-color: #cccccc; 85 | box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); 86 | color: rgba(0, 0, 0, 0.75); 87 | display: block; 88 | font-family: inherit; 89 | font-size: 0.875rem; 90 | height: 2.3125rem; 91 | margin: 0 0 1rem 0; 92 | padding: 0.5rem; 93 | width: 100%; 94 | -webkit-box-sizing: border-box; 95 | -moz-box-sizing: border-box; 96 | box-sizing: border-box; 97 | -webkit-transition: border-color 0.15s linear, background 0.15s linear; 98 | -moz-transition: border-color 0.15s linear, background 0.15s linear; 99 | -ms-transition: border-color 0.15s linear, background 0.15s linear; 100 | -o-transition: border-color 0.15s linear, background 0.15s linear; 101 | transition: border-color 0.15s linear, background 0.15s linear; } 102 | input:not([type]):focus, input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="color"]:focus, textarea:focus { 103 | background: #fafafa; 104 | border-color: #999999; 105 | outline: none; } 106 | input:not([type]):disabled, input[type="text"]:disabled, input[type="password"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="month"]:disabled, input[type="week"]:disabled, input[type="email"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="color"]:disabled, textarea:disabled { 107 | background-color: #DDDDDD; 108 | cursor: default; } 109 | input:not([type])[disabled], input:not([type])[readonly], fieldset[disabled] input:not([type]), input[type="text"][disabled], input[type="text"][readonly], fieldset[disabled] input[type="text"], input[type="password"][disabled], input[type="password"][readonly], fieldset[disabled] input[type="password"], input[type="date"][disabled], input[type="date"][readonly], fieldset[disabled] input[type="date"], input[type="datetime"][disabled], input[type="datetime"][readonly], fieldset[disabled] input[type="datetime"], input[type="datetime-local"][disabled], input[type="datetime-local"][readonly], fieldset[disabled] input[type="datetime-local"], input[type="month"][disabled], input[type="month"][readonly], fieldset[disabled] input[type="month"], input[type="week"][disabled], input[type="week"][readonly], fieldset[disabled] input[type="week"], input[type="email"][disabled], input[type="email"][readonly], fieldset[disabled] input[type="email"], input[type="number"][disabled], input[type="number"][readonly], fieldset[disabled] input[type="number"], input[type="search"][disabled], input[type="search"][readonly], fieldset[disabled] input[type="search"], input[type="tel"][disabled], input[type="tel"][readonly], fieldset[disabled] input[type="tel"], input[type="time"][disabled], input[type="time"][readonly], fieldset[disabled] input[type="time"], input[type="url"][disabled], input[type="url"][readonly], fieldset[disabled] input[type="url"], input[type="color"][disabled], input[type="color"][readonly], fieldset[disabled] input[type="color"], textarea[disabled], textarea[readonly], fieldset[disabled] textarea { 110 | background-color: #DDDDDD; 111 | cursor: default; } 112 | input:not([type]).radius, input[type="text"].radius, input[type="password"].radius, input[type="date"].radius, input[type="datetime"].radius, input[type="datetime-local"].radius, input[type="month"].radius, input[type="week"].radius, input[type="email"].radius, input[type="number"].radius, input[type="search"].radius, input[type="tel"].radius, input[type="time"].radius, input[type="url"].radius, input[type="color"].radius, textarea.radius { 113 | border-radius: 3px; } 114 | 115 | form .row .prefix-radius.row.collapse input, 116 | form .row .prefix-radius.row.collapse textarea, 117 | form .row .prefix-radius.row.collapse select, 118 | form .row .prefix-radius.row.collapse button { 119 | border-radius: 0; 120 | -webkit-border-bottom-right-radius: 3px; 121 | -webkit-border-top-right-radius: 3px; 122 | border-bottom-right-radius: 3px; 123 | border-top-right-radius: 3px; } 124 | form .row .prefix-radius.row.collapse .prefix { 125 | border-radius: 0; 126 | -webkit-border-bottom-left-radius: 3px; 127 | -webkit-border-top-left-radius: 3px; 128 | border-bottom-left-radius: 3px; 129 | border-top-left-radius: 3px; } 130 | form .row .postfix-radius.row.collapse input, 131 | form .row .postfix-radius.row.collapse textarea, 132 | form .row .postfix-radius.row.collapse select, 133 | form .row .postfix-radius.row.collapse button { 134 | border-radius: 0; 135 | -webkit-border-bottom-left-radius: 3px; 136 | -webkit-border-top-left-radius: 3px; 137 | border-bottom-left-radius: 3px; 138 | border-top-left-radius: 3px; } 139 | form .row .postfix-radius.row.collapse .postfix { 140 | border-radius: 0; 141 | -webkit-border-bottom-right-radius: 3px; 142 | -webkit-border-top-right-radius: 3px; 143 | border-bottom-right-radius: 3px; 144 | border-top-right-radius: 3px; } 145 | form .row .prefix-round.row.collapse input, 146 | form .row .prefix-round.row.collapse textarea, 147 | form .row .prefix-round.row.collapse select, 148 | form .row .prefix-round.row.collapse button { 149 | border-radius: 0; 150 | -webkit-border-bottom-right-radius: 1000px; 151 | -webkit-border-top-right-radius: 1000px; 152 | border-bottom-right-radius: 1000px; 153 | border-top-right-radius: 1000px; } 154 | form .row .prefix-round.row.collapse .prefix { 155 | border-radius: 0; 156 | -webkit-border-bottom-left-radius: 1000px; 157 | -webkit-border-top-left-radius: 1000px; 158 | border-bottom-left-radius: 1000px; 159 | border-top-left-radius: 1000px; } 160 | form .row .postfix-round.row.collapse input, 161 | form .row .postfix-round.row.collapse textarea, 162 | form .row .postfix-round.row.collapse select, 163 | form .row .postfix-round.row.collapse button { 164 | border-radius: 0; 165 | -webkit-border-bottom-left-radius: 1000px; 166 | -webkit-border-top-left-radius: 1000px; 167 | border-bottom-left-radius: 1000px; 168 | border-top-left-radius: 1000px; } 169 | form .row .postfix-round.row.collapse .postfix { 170 | border-radius: 0; 171 | -webkit-border-bottom-right-radius: 1000px; 172 | -webkit-border-top-right-radius: 1000px; 173 | border-bottom-right-radius: 1000px; 174 | border-top-right-radius: 1000px; } 175 | 176 | input[type="submit"] { 177 | -webkit-appearance: none; 178 | -moz-appearance: none; 179 | border-radius: 0; } 180 | /* We add basic fieldset styling */ 181 | fieldset { 182 | border: 1px solid #DDDDDD; 183 | margin: 1.125rem 0; 184 | padding: 1.25rem; } 185 | fieldset legend { 186 | font-weight: bold; 187 | margin: 0; 188 | margin-left: -0.1875rem; 189 | padding: 0 0.1875rem; } -------------------------------------------------------------------------------- /public/css/toastr.min.css: -------------------------------------------------------------------------------- 1 | .toast-title{font-weight:700}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#FFF}.toast-message a:hover{color:#CCC;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#FFF;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#FFF;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}#toast-container>.toast-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}#toast-container>.toast-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}#toast-container>.toast-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}#toast-container.toast-bottom-center>div,#toast-container.toast-top-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51A351}.toast-error{background-color:#BD362F}.toast-info{background-color:#2F96B4}.toast-warning{background-color:#F89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}} -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chizzoz/laravel-vue-foundation-simple-CRUD/8540e3c699c4e1abf2d7991cb2460a627eb5c0f7/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels great to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /public/js/toastr.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&&(v=d(t)),v)}function o(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function s(e){C=e}function i(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&&o.force;return!(!t||!s&&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("
").attr("id",t.containerId).addClass(t.positionClass),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function f(e){C&&C(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function s(){c(),u(),d(),p(),g(),C(),l(),i()}function i(){var e="";switch(t.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}I.attr("aria-live",e)}function a(){E.closeOnHover&&I.hover(H,D),!E.onclick&&E.tapToDismiss&&I.click(b),E.closeButton&&j&&j.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),E.onCloseClick&&E.onCloseClick(e),b(!0)}),E.onclick&&I.click(function(e){E.onclick(e),b()})}function r(){I.hide(),I[E.showMethod]({duration:E.showDuration,easing:E.showEasing,complete:E.onShown}),E.timeOut>0&&(k=setTimeout(b,E.timeOut),F.maxHideTime=parseFloat(E.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,E.progressBar&&(F.intervalId=setInterval(x,10)))}function c(){t.iconClass&&I.addClass(E.toastClass).addClass(y)}function l(){E.newestOnTop?v.prepend(I):v.append(I)}function u(){if(t.title){var e=t.title;E.escapeHtml&&(e=o(t.title)),M.append(e).addClass(E.titleClass),I.append(M)}}function d(){if(t.message){var e=t.message;E.escapeHtml&&(e=o(t.message)),B.append(e).addClass(E.messageClass),I.append(B)}}function p(){E.closeButton&&(j.addClass(E.closeClass).attr("role","button"),I.prepend(j))}function g(){E.progressBar&&(q.addClass(E.progressClass),I.prepend(q))}function C(){E.rtl&&I.addClass("rtl")}function O(e,t){if(e.preventDuplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&&E.closeMethod!==!1?E.closeMethod:E.hideMethod,o=t&&E.closeDuration!==!1?E.closeDuration:E.hideDuration,s=t&&E.closeEasing!==!1?E.closeEasing:E.hideEasing;if(!e(":focus",I).length||t)return clearTimeout(F.intervalId),I[n]({duration:o,easing:s,complete:function(){h(I),clearTimeout(k),E.onHidden&&"hidden"!==P.state&&E.onHidden(),P.state="hidden",P.endTime=new Date,f(P)}})}function D(){(E.timeOut>0||E.extendedTimeOut>0)&&(k=setTimeout(b,E.extendedTimeOut),F.maxHideTime=parseFloat(E.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function H(){clearTimeout(k),F.hideEta=0,I.stop(!0,!0)[E.showMethod]({duration:E.showDuration,easing:E.showEasing})}function x(){var e=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;q.width(e+"%")}var E=m(),y=t.iconClass||E.iconClass;if("undefined"!=typeof t.optionsOverride&&(E=e.extend(E,t.optionsOverride),y=t.optionsOverride.iconClass||y),!O(E,t)){T++,v=n(E,!0);var k=null,I=e("
"),M=e("
"),B=e("
"),q=e("
"),j=e(E.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:T,state:"visible",startTime:new Date,options:E,map:t};return s(),r(),a(),f(P),E.debug&&console&&console.log(P),I}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,C,w,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.3",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}); 2 | //# sourceMappingURL=toastr.js.map 3 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/mix.js": "/mix.js", 4 | "/css/app.css": "/css/app.css" 5 | } -------------------------------------------------------------------------------- /public/mix.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | /******/ 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | /******/ 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | /******/ 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ i: moduleId, 15 | /******/ l: false, 16 | /******/ exports: {} 17 | /******/ }; 18 | /******/ 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | /******/ 22 | /******/ // Flag the module as loaded 23 | /******/ module.l = true; 24 | /******/ 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | /******/ 29 | /******/ 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | /******/ 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | /******/ 36 | /******/ // identity function for calling harmony imports with the correct context 37 | /******/ __webpack_require__.i = function(value) { return value; }; 38 | /******/ 39 | /******/ // define getter function for harmony exports 40 | /******/ __webpack_require__.d = function(exports, name, getter) { 41 | /******/ if(!__webpack_require__.o(exports, name)) { 42 | /******/ Object.defineProperty(exports, name, { 43 | /******/ configurable: false, 44 | /******/ enumerable: true, 45 | /******/ get: getter 46 | /******/ }); 47 | /******/ } 48 | /******/ }; 49 | /******/ 50 | /******/ // getDefaultExport function for compatibility with non-harmony modules 51 | /******/ __webpack_require__.n = function(module) { 52 | /******/ var getter = module && module.__esModule ? 53 | /******/ function getDefault() { return module['default']; } : 54 | /******/ function getModuleExports() { return module; }; 55 | /******/ __webpack_require__.d(getter, 'a', getter); 56 | /******/ return getter; 57 | /******/ }; 58 | /******/ 59 | /******/ // Object.prototype.hasOwnProperty.call 60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 61 | /******/ 62 | /******/ // __webpack_public_path__ 63 | /******/ __webpack_require__.p = ""; 64 | /******/ 65 | /******/ // Load entry module and return exports 66 | /******/ return __webpack_require__(__webpack_require__.s = 42); 67 | /******/ }) 68 | /************************************************************************/ 69 | /******/ ({ 70 | 71 | /***/ 10: 72 | /***/ (function(module, exports) { 73 | 74 | 75 | 76 | /***/ }), 77 | 78 | /***/ 42: 79 | /***/ (function(module, exports, __webpack_require__) { 80 | 81 | __webpack_require__(10); 82 | module.exports = __webpack_require__(9); 83 | 84 | 85 | /***/ }), 86 | 87 | /***/ 9: 88 | /***/ (function(module, exports) { 89 | 90 | // removed by extract-text-webpack-plugin 91 | 92 | /***/ }) 93 | 94 | /******/ }); -------------------------------------------------------------------------------- /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/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | 10 | /** 11 | * Next, we will create a fresh Vue application instance and attach it to 12 | * the page. Then, you may begin adding components to this application 13 | * or customize the JavaScript scaffolding to fit your unique needs. 14 | */ 15 | 16 | Vue.component('example', require('./components/Crud.vue')); 17 | 18 | const app = new Vue({ 19 | el: '#manage-vue' 20 | }); 21 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * Vue is a modern JavaScript library for building interactive web interfaces 6 | * using reactive data binding and reusable components. Vue's API is clean 7 | * and simple, leaving you to focus on building your next great project. 8 | */ 9 | 10 | window.Vue = require('vue'); 11 | 12 | /** 13 | * We'll load the axios HTTP library which allows us to easily issue requests 14 | * to our Laravel back-end. This library automatically handles sending the 15 | * CSRF token as a header based on the value of the "XSRF" token cookie. 16 | */ 17 | 18 | window.axios = require('axios'); 19 | 20 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken; 21 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 22 | 23 | /** 24 | * Echo exposes an expressive API for subscribing to channels and listening 25 | * for events that are broadcast by Laravel. Echo and event broadcasting 26 | * allows your team to easily build robust real-time web applications. 27 | */ 28 | 29 | // import Echo from 'laravel-echo' 30 | 31 | // window.Pusher = require('pusher-js'); 32 | 33 | // window.Echo = new Echo({ 34 | // broadcaster: 'pusher', 35 | // key: 'your-pusher-key' 36 | // }); 37 | -------------------------------------------------------------------------------- /resources/assets/js/components/Crud.vue: -------------------------------------------------------------------------------- 1 | 98 | 99 | 200 | -------------------------------------------------------------------------------- /resources/assets/js/components/Example.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url(http://fonts.googleapis.com/css?family=Open+Sans); 4 | 5 | // Settings 6 | @import "vendor/zurb/foundation/scss/settings/settings"; 7 | 8 | // Foundation 9 | @import "vendor/zurb/foundation/scss/foundation"; 10 | 11 | // Everything 12 | @include foundation-global-styles; 13 | @include foundation-grid; 14 | @include foundation-typography; 15 | @include foundation-forms; 16 | @include foundation-button; 17 | @include foundation-accordion; 18 | @include foundation-accordion-menu; 19 | @include foundation-badge; 20 | @include foundation-breadcrumbs; 21 | @include foundation-button-group; 22 | @include foundation-callout; 23 | @include foundation-card; 24 | @include foundation-close-button; 25 | @include foundation-menu; 26 | @include foundation-menu-icon; 27 | @include foundation-drilldown-menu; 28 | @include foundation-dropdown; 29 | @include foundation-dropdown-menu; 30 | @include foundation-responsive-embed; 31 | @include foundation-label; 32 | @include foundation-media-object; 33 | @include foundation-off-canvas; 34 | @include foundation-orbit; 35 | @include foundation-pagination; 36 | @include foundation-progress-bar; 37 | @include foundation-slider; 38 | @include foundation-sticky; 39 | @include foundation-reveal; 40 | @include foundation-switch; 41 | @include foundation-table; 42 | @include foundation-tabs; 43 | @include foundation-thumbnail; 44 | @include foundation-title-bar; 45 | @include foundation-tooltip; 46 | @include foundation-top-bar; 47 | @include foundation-visibility-classes; 48 | @include foundation-float-classes; 49 | -------------------------------------------------------------------------------- /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/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 20 | 'alpha' => 'The :attribute may only contain letters.', 21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 23 | 'array' => 'The :attribute must be an array.', 24 | 'before' => 'The :attribute must be a date before :date.', 25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 26 | 'between' => [ 27 | 'numeric' => 'The :attribute must be between :min and :max.', 28 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 29 | 'string' => 'The :attribute must be between :min and :max characters.', 30 | 'array' => 'The :attribute must have between :min and :max items.', 31 | ], 32 | 'boolean' => 'The :attribute field must be true or false.', 33 | 'confirmed' => 'The :attribute confirmation does not match.', 34 | 'date' => 'The :attribute is not a valid date.', 35 | 'date_format' => 'The :attribute does not match the format :format.', 36 | 'different' => 'The :attribute and :other must be different.', 37 | 'digits' => 'The :attribute must be :digits digits.', 38 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 39 | 'dimensions' => 'The :attribute has invalid image dimensions.', 40 | 'distinct' => 'The :attribute field has a duplicate value.', 41 | 'email' => 'The :attribute must be a valid email address.', 42 | 'exists' => 'The selected :attribute is invalid.', 43 | 'file' => 'The :attribute must be a file.', 44 | 'filled' => 'The :attribute field must have a value.', 45 | 'image' => 'The :attribute must be an image.', 46 | 'in' => 'The selected :attribute is invalid.', 47 | 'in_array' => 'The :attribute field does not exist in :other.', 48 | 'integer' => 'The :attribute must be an integer.', 49 | 'ip' => 'The :attribute must be a valid IP address.', 50 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 51 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 52 | 'json' => 'The :attribute must be a valid JSON string.', 53 | 'max' => [ 54 | 'numeric' => 'The :attribute may not be greater than :max.', 55 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 56 | 'string' => 'The :attribute may not be greater than :max characters.', 57 | 'array' => 'The :attribute may not have more than :max items.', 58 | ], 59 | 'mimes' => 'The :attribute must be a file of type: :values.', 60 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 61 | 'min' => [ 62 | 'numeric' => 'The :attribute must be at least :min.', 63 | 'file' => 'The :attribute must be at least :min kilobytes.', 64 | 'string' => 'The :attribute must be at least :min characters.', 65 | 'array' => 'The :attribute must have at least :min items.', 66 | ], 67 | 'not_in' => 'The selected :attribute is invalid.', 68 | 'numeric' => 'The :attribute must be a number.', 69 | 'present' => 'The :attribute field must be present.', 70 | 'regex' => 'The :attribute format is invalid.', 71 | 'required' => 'The :attribute field is required.', 72 | 'required_if' => 'The :attribute field is required when :other is :value.', 73 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 74 | 'required_with' => 'The :attribute field is required when :values is present.', 75 | 'required_with_all' => 'The :attribute field is required when :values is present.', 76 | 'required_without' => 'The :attribute field is required when :values is not present.', 77 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 78 | 'same' => 'The :attribute and :other must match.', 79 | 'size' => [ 80 | 'numeric' => 'The :attribute must be :size.', 81 | 'file' => 'The :attribute must be :size kilobytes.', 82 | 'string' => 'The :attribute must be :size characters.', 83 | 'array' => 'The :attribute must contain :size items.', 84 | ], 85 | 'string' => 'The :attribute must be a string.', 86 | 'timezone' => 'The :attribute must be a valid zone.', 87 | 'unique' => 'The :attribute has already been taken.', 88 | 'uploaded' => 'The :attribute failed to upload.', 89 | 'url' => 'The :attribute format is invalid.', 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Custom Validation Language Lines 94 | |-------------------------------------------------------------------------- 95 | | 96 | | Here you may specify custom validation messages for attributes using the 97 | | convention "attribute.rule" to name the lines. This makes it quick to 98 | | specify a specific custom language line for a given attribute rule. 99 | | 100 | */ 101 | 102 | 'custom' => [ 103 | 'attribute-name' => [ 104 | 'rule-name' => 'custom-message', 105 | ], 106 | ], 107 | 108 | /* 109 | |-------------------------------------------------------------------------- 110 | | Custom Validation Attributes 111 | |-------------------------------------------------------------------------- 112 | | 113 | | The following language lines are used to swap attribute place-holders 114 | | with something more reader friendly such as E-Mail Address instead 115 | | of "email". This simply helps us make messages a little cleaner. 116 | | 117 | */ 118 | 119 | 'attributes' => [], 120 | 121 | ]; 122 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

Login

7 |
8 | {{ csrf_field() }} 9 | 10 | 11 |
12 |
13 |
14 | Username 15 |
16 |
17 | 18 |
19 |
20 | @if (count($errors) > 0) 21 | @foreach ($errors->get('email') as $error) 22 | {{ $error }} 23 | @endforeach 24 | @endif 25 |
26 | 27 | 28 |
29 |
30 |
31 | Password 32 |
33 |
34 | 35 |
36 |
37 | @if (count($errors) > 0) 38 | @foreach ($errors->get('password') as $error) 39 | {{ $error }} 40 | @endforeach 41 | @endif 42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 | 50 | Forgot Your Password? 51 |
52 |
53 |
54 |
55 | @endsection 56 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 | @if (session('status')) 11 |
12 | {{ session('status') }} 13 |
14 | @endif 15 | 16 |
17 | {{ csrf_field() }} 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 | @if ($errors->has('email')) 26 | 27 | {{ $errors->first('email') }} 28 | 29 | @endif 30 |
31 |
32 | 33 |
34 |
35 | 38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 | 10 |
11 | @if (session('status')) 12 |
13 | {{ session('status') }} 14 |
15 | @endif 16 | 17 |
18 | {{ csrf_field() }} 19 | 20 | 21 | 22 |
23 | 24 | 25 |
26 | 27 | 28 | @if ($errors->has('email')) 29 | 30 | {{ $errors->first('email') }} 31 | 32 | @endif 33 |
34 |
35 | 36 |
37 | 38 | 39 |
40 | 41 | 42 | @if ($errors->has('password')) 43 | 44 | {{ $errors->first('password') }} 45 | 46 | @endif 47 |
48 |
49 | 50 |
51 | 52 |
53 | 54 | 55 | @if ($errors->has('password_confirmation')) 56 | 57 | {{ $errors->first('password_confirmation') }} 58 | 59 | @endif 60 |
61 |
62 | 63 |
64 |
65 | 68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | @endsection 77 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

Register

7 |
8 |
9 | {{ csrf_field() }} 10 | 11 | 12 |
13 |
14 |
15 | Username 16 |
17 |
18 | 19 |
20 |
21 | @if (count($errors) > 0) 22 | @foreach ($errors->get('username') as $error) 23 | {{ $error }} 24 | @endforeach 25 | @endif 26 |
27 | 28 | 29 |
30 |
31 |
32 | e-Mail Address 33 |
34 |
35 | 36 |
37 |
38 | @if (count($errors) > 0) 39 | @foreach ($errors->get('email') as $error) 40 | {{ $error }} 41 | @endforeach 42 | @endif 43 |
44 | 45 | 46 |
47 |
48 |
49 | Password 50 |
51 |
52 | 53 |
54 |
55 | @if (count($errors) > 0) 56 | @foreach ($errors->get('password') as $error) 57 | {{ $error }} 58 | @endforeach 59 | @endif 60 |
61 | 62 | 63 |
64 |
65 |
66 | Password Confirm 67 |
68 |
69 | 70 |
71 |
72 | @if (count($errors) > 0) 73 | @foreach ($errors->get('password-confirm') as $error) 74 | {{ $error }} 75 | @endforeach 76 | @endif 77 |
78 | 79 |
80 | 81 |
82 |
83 |
84 |
85 |
86 | @endsection 87 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Dashboard
9 | 10 |
11 | You are logged in! 12 |
13 |
14 |
15 |
16 |
17 | @endsection 18 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ config('app.name', 'Vue') }} 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 |
26 | 27 | 28 | 29 | 30 | {{ config('app.name') }} 31 |
32 |
33 |
34 | 37 |
38 |
39 | 40 | 66 |
67 |
68 |
69 |
70 | 71 |
72 | @yield('content') 73 |
74 | 75 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /resources/views/manage-vue.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | 7 |
8 | 9 |
10 | @endsection 11 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 12 | 13 | 14 | 66 | 67 | 68 |
69 | @if (Route::has('login')) 70 | 78 | @endif 79 | 80 |
81 |
82 | Laravel 83 |
84 | 85 | 92 |
93 |
94 | 95 | 96 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | 'manage-vue', 'uses' => 'VueItemController@manageVue')); 21 | Route::resource('vueitems', 'VueItemController'); 22 | -------------------------------------------------------------------------------- /screencapture-laravel-vue-foundation-simple-CRUD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chizzoz/laravel-vue-foundation-simple-CRUD/8540e3c699c4e1abf2d7991cb2460a627eb5c0f7/screencapture-laravel-vue-foundation-simple-CRUD.png -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /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 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /techstack.md: -------------------------------------------------------------------------------- 1 | 36 |
37 | 38 | # Tech Stack File 39 | ![](https://img.stackshare.io/repo.svg "repo") [Chizzoz/laravel-vue-foundation-simple-CRUD](https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD)![](https://img.stackshare.io/public_badge.svg "public") 40 |

41 | |21
Tools used|02/11/24
Report generated| 42 | |------|------| 43 |
44 | 45 | ## Languages (2) 46 | 47 | 54 | 55 | 62 | 63 | 64 |
48 | JavaScript 49 |
50 | JavaScript 51 |
52 | 53 |
56 | PHP 57 |
58 | PHP 59 |
60 | 61 |
65 | 66 | ## Frameworks (3) 67 | 68 | 75 | 76 | 83 | 84 | 91 | 92 | 93 |
69 | Laravel 70 |
71 | Laravel 72 |
73 | v5.4.23 74 |
77 | Vue.js 78 |
79 | Vue.js 80 |
81 | v2.3.3 82 |
85 | jQuery 86 |
87 | jQuery 88 |
89 | 90 |
94 | 95 | ## DevOps (3) 96 | 97 | 104 | 105 | 112 | 113 | 120 | 121 | 122 |
98 | Git 99 |
100 | Git 101 |
102 | 103 |
106 | PHPUnit 107 |
108 | PHPUnit 109 |
110 | v5.7.19 111 |
114 | npm 115 |
116 | npm 117 |
118 | 119 |
123 | 124 | ## Other (3) 125 | 126 | 133 | 134 | 141 | 142 | 149 | 150 | 151 |
127 | Lodash 128 |
129 | Lodash 130 |
131 | v4.17.4 132 |
135 | axios 136 |
137 | axios 138 |
139 | v0.16.1 140 |
143 | laravel-mix 144 |
145 | laravel-mix 146 |
147 | 148 |
152 | 153 | 154 | ## Open source packages (10) 155 | 156 | ## Packagist (7) 157 | 158 | |NAME|VERSION|LAST UPDATED|LAST UPDATED BY|LICENSE|VULNERABILITIES| 159 | |:------|:------|:------|:------|:------|:------| 160 | |[components/jquery](https://packagist.org/components/jquery)|v3.2.1|05/12/17|Chizzo Cheese |N/A|N/A| 161 | |[fzaninotto/faker](https://packagist.org/fzaninotto/faker)|v1.6.0|05/12/17|Chizzo Cheese |N/A|N/A| 162 | |[laravel/framework](https://packagist.org/laravel/framework)|v5.4.23|05/12/17|Chizzo Cheese |N/A|N/A| 163 | |[laravel/tinker](https://packagist.org/laravel/tinker)|v1.0.0|05/12/17|Chizzo Cheese |N/A|N/A| 164 | |[mockery/mockery](https://packagist.org/mockery/mockery)|v0.9.9|05/12/17|Chizzo Cheese |N/A|N/A| 165 | |[phpunit/phpunit](https://packagist.org/phpunit/phpunit)|v5.7.19|05/12/17|Chizzo Cheese |N/A|N/A| 166 | |[zurb/foundation](https://packagist.org/zurb/foundation)|v6.3.1|05/12/17|Chizzo Cheese |N/A|N/A| 167 | 168 | 169 | ## npm (3) 170 | 171 | |NAME|VERSION|LAST UPDATED|LAST UPDATED BY|LICENSE|VULNERABILITIES| 172 | |:------|:------|:------|:------|:------|:------| 173 | |[cross-env](https://www.npmjs.com/cross-env)|v5.0.0|05/12/17|Chizzo Cheese |MIT|N/A| 174 | |[laravel-mix](https://www.npmjs.com/laravel-mix)|N/A|05/12/17|Chizzo Cheese |MIT|N/A| 175 | |[vue](https://www.npmjs.com/vue)|v2.3.3|05/12/17|Chizzo Cheese |MIT|N/A| 176 | 177 |
178 |
179 | 180 | Generated via [Stack File](https://github.com/marketplace/stack-file) 181 | -------------------------------------------------------------------------------- /techstack.yml: -------------------------------------------------------------------------------- 1 | repo_name: Chizzoz/laravel-vue-foundation-simple-CRUD 2 | report_id: 709a4a6e3f66a7437e5de8603311eec5 3 | version: 0.1 4 | repo_type: Public 5 | timestamp: '2024-02-11T17:05:48+00:00' 6 | requested_by: Chizzoz 7 | provider: github 8 | branch: master 9 | detected_tools_count: 21 10 | tools: 11 | - name: JavaScript 12 | description: Lightweight, interpreted, object-oriented language with first-class 13 | functions 14 | website_url: https://developer.mozilla.org/en-US/docs/Web/JavaScript 15 | open_source: true 16 | hosted_saas: false 17 | category: Languages & Frameworks 18 | sub_category: Languages 19 | image_url: https://img.stackshare.io/service/1209/javascript.jpeg 20 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/public/js/app.js 21 | detection_source: public/js/app.js 22 | last_updated_by: Chizzo Cheese 23 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 24 | - name: PHP 25 | description: A popular general-purpose scripting language that is especially suited 26 | to web development 27 | website_url: http://www.php.net/ 28 | open_source: true 29 | hosted_saas: false 30 | category: Languages & Frameworks 31 | sub_category: Languages 32 | image_url: https://img.stackshare.io/service/991/hwUcGZ41_400x400.jpg 33 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD 34 | detection_source: Repo Metadata 35 | - name: Laravel 36 | description: A PHP Framework For Web Artisans 37 | website_url: http://laravel.com/ 38 | version: 5.4.23 39 | open_source: false 40 | hosted_saas: false 41 | category: Languages & Frameworks 42 | sub_category: Frameworks (Full Stack) 43 | image_url: https://img.stackshare.io/service/992/AcA2LnWL_400x400.jpg 44 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 45 | detection_source: composer.json 46 | last_updated_by: Chizzo Cheese 47 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 48 | - name: Vue.js 49 | description: A progressive framework for building user interfaces 50 | website_url: http://vuejs.org/ 51 | version: 2.3.3 52 | license: MIT 53 | open_source: true 54 | hosted_saas: false 55 | category: Libraries 56 | sub_category: Javascript MVC Frameworks 57 | image_url: https://img.stackshare.io/service/3837/paeckCWC.png 58 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 59 | detection_source: package.json 60 | last_updated_by: Chizzo Cheese 61 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 62 | - name: jQuery 63 | description: The Write Less, Do More, JavaScript Library. 64 | website_url: http://jquery.com/ 65 | license: MIT 66 | open_source: true 67 | hosted_saas: false 68 | category: Libraries 69 | sub_category: Javascript UI Libraries 70 | image_url: https://img.stackshare.io/service/1021/lxEKmMnB_400x400.jpg 71 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.json 72 | detection_source: composer.json 73 | last_updated_by: Chizzo Cheese 74 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 75 | - name: Git 76 | description: Fast, scalable, distributed revision control system 77 | website_url: http://git-scm.com/ 78 | open_source: true 79 | hosted_saas: false 80 | category: Build, Test, Deploy 81 | sub_category: Version Control System 82 | image_url: https://img.stackshare.io/service/1046/git.png 83 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD 84 | detection_source: Repo Metadata 85 | - name: PHPUnit 86 | description: Testing framework for PHP 87 | website_url: https://phpunit.de/ 88 | version: 5.7.19 89 | license: BSD-3-Clause 90 | open_source: true 91 | hosted_saas: false 92 | category: Build, Test, Deploy 93 | sub_category: Testing Frameworks 94 | image_url: https://img.stackshare.io/service/1616/1_WsEnddd5Y4EgEHsT054kUQ.jpeg 95 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 96 | detection_source: composer.json 97 | last_updated_by: Chizzo Cheese 98 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 99 | - name: npm 100 | description: The package manager for JavaScript. 101 | website_url: https://www.npmjs.com/ 102 | open_source: false 103 | hosted_saas: false 104 | category: Build, Test, Deploy 105 | sub_category: Front End Package Manager 106 | image_url: https://img.stackshare.io/service/1120/lejvzrnlpb308aftn31u.png 107 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 108 | detection_source: package.json 109 | last_updated_by: Chizzo Cheese 110 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 111 | - name: Lodash 112 | description: A JavaScript utility library 113 | website_url: https://lodash.com 114 | version: 4.17.4 115 | open_source: true 116 | hosted_saas: false 117 | category: Libraries 118 | sub_category: Javascript Utilities & Libraries 119 | image_url: https://img.stackshare.io/service/2438/lodash.png 120 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 121 | detection_source: package.json 122 | last_updated_by: Chizzo Cheese 123 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 124 | - name: axios 125 | description: Promise based HTTP client for the browser and node.js 126 | website_url: https://github.com/mzabriskie/axios 127 | version: 0.16.1 128 | license: MIT 129 | open_source: true 130 | hosted_saas: false 131 | category: Libraries 132 | sub_category: Javascript Utilities & Libraries 133 | image_url: https://img.stackshare.io/no-img-open-source.png 134 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 135 | detection_source: package.json 136 | last_updated_by: Chizzo Cheese 137 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 138 | - name: laravel-mix 139 | description: A framework for web artisans. 140 | website_url: https://laravel.com/docs/5.5/mix 141 | open_source: false 142 | hosted_saas: false 143 | image_url: https://img.stackshare.io/service/7945/h7umz7fz_normal.jpg 144 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 145 | detection_source: package.json 146 | last_updated_by: Chizzo Cheese 147 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 148 | - name: components/jquery 149 | description: JQuery JavaScript Library 150 | package_url: https://packagist.org/components/jquery 151 | version: 3.2.1 152 | open_source: false 153 | hosted_saas: false 154 | category: Build, Test, Deploy 155 | sub_category: Package Managers 156 | image_url: https://img.stackshare.io/package/packagist/image.png 157 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 158 | detection_source: composer.json 159 | last_updated_by: Chizzo Cheese 160 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 161 | - name: fzaninotto/faker 162 | description: Faker is a PHP library that generates fake data for you 163 | package_url: https://packagist.org/fzaninotto/faker 164 | version: 1.6.0 165 | open_source: false 166 | hosted_saas: false 167 | category: Build, Test, Deploy 168 | sub_category: Package Managers 169 | image_url: https://img.stackshare.io/package/packagist/image.png 170 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 171 | detection_source: composer.json 172 | last_updated_by: Chizzo Cheese 173 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 174 | - name: laravel/framework 175 | description: The Laravel Framework 176 | package_url: https://packagist.org/laravel/framework 177 | version: 5.4.23 178 | open_source: false 179 | hosted_saas: false 180 | category: Build, Test, Deploy 181 | sub_category: Package Managers 182 | image_url: https://img.stackshare.io/package/packagist/image.png 183 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 184 | detection_source: composer.json 185 | last_updated_by: Chizzo Cheese 186 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 187 | - name: laravel/tinker 188 | description: Powerful REPL for the Laravel framework 189 | package_url: https://packagist.org/laravel/tinker 190 | version: 1.0.0 191 | open_source: false 192 | hosted_saas: false 193 | category: Build, Test, Deploy 194 | sub_category: Package Managers 195 | image_url: https://img.stackshare.io/package/packagist/image.png 196 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 197 | detection_source: composer.json 198 | last_updated_by: Chizzo Cheese 199 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 200 | - name: mockery/mockery 201 | description: Mockery is a simple yet flexible PHP mock object framework 202 | package_url: https://packagist.org/mockery/mockery 203 | version: 0.9.9 204 | open_source: false 205 | hosted_saas: false 206 | category: Build, Test, Deploy 207 | sub_category: Package Managers 208 | image_url: https://img.stackshare.io/package/packagist/image.png 209 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 210 | detection_source: composer.json 211 | last_updated_by: Chizzo Cheese 212 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 213 | - name: phpunit/phpunit 214 | description: The PHP Unit Testing framework 215 | package_url: https://packagist.org/phpunit/phpunit 216 | version: 5.7.19 217 | open_source: false 218 | hosted_saas: false 219 | category: Build, Test, Deploy 220 | sub_category: Package Managers 221 | image_url: https://img.stackshare.io/package/packagist/image.png 222 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 223 | detection_source: composer.json 224 | last_updated_by: Chizzo Cheese 225 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 226 | - name: zurb/foundation 227 | description: The most advanced responsive front-end framework in the world 228 | package_url: https://packagist.org/zurb/foundation 229 | version: 6.3.1 230 | open_source: false 231 | hosted_saas: false 232 | category: Build, Test, Deploy 233 | sub_category: Package Managers 234 | image_url: https://img.stackshare.io/package/packagist/image.png 235 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/composer.lock 236 | detection_source: composer.json 237 | last_updated_by: Chizzo Cheese 238 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 239 | - name: cross-env 240 | description: Run scripts that set and use environment variables across platforms 241 | package_url: https://www.npmjs.com/cross-env 242 | version: 5.0.0 243 | license: MIT 244 | open_source: true 245 | hosted_saas: false 246 | category: Libraries 247 | sub_category: npm Packages 248 | image_url: https://img.stackshare.io/package/15828/default_14fd11531839d935f920b6d55bd6f3528c890ad7.png 249 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 250 | detection_source: package.json 251 | last_updated_by: Chizzo Cheese 252 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 253 | - name: laravel-mix 254 | description: Laravel Mix is an elegant wrapper around Webpack for the 80% use case 255 | package_url: https://www.npmjs.com/laravel-mix 256 | license: MIT 257 | open_source: true 258 | hosted_saas: false 259 | category: Libraries 260 | sub_category: npm Packages 261 | image_url: https://img.stackshare.io/package/17350/default_33c3173e7d0e91f7cea0eab9883ca83b157bd4a5.png 262 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 263 | detection_source: package.json 264 | last_updated_by: Chizzo Cheese 265 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 266 | - name: vue 267 | description: Vue 268 | package_url: https://www.npmjs.com/vue 269 | version: 2.3.3 270 | license: MIT 271 | open_source: true 272 | hosted_saas: false 273 | category: Libraries 274 | sub_category: npm Packages 275 | image_url: https://img.stackshare.io/package/15844/default_b71c906aeda030a5e2f1fe40bf12a93be52404ab.png 276 | detection_source_url: https://github.com/Chizzoz/laravel-vue-foundation-simple-CRUD/blob/master/package.json 277 | detection_source: package.json 278 | last_updated_by: Chizzo Cheese 279 | last_updated_on: 2017-05-12 16:25:42.000000000 Z 280 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 20 | 21 | $response->assertStatus(200); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const { mix } = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.sass('resources/assets/sass/app.scss', 'public/css') 15 | .js('resources/assets/js/app.js', 'public/js'); 16 | mix.copy('vendor/components/jquery/jquery.min.js', 'public/js'); 17 | mix.copy('vendor/zurb/foundation/dist/js/foundation.min.js', 'public/js'); 18 | mix.copy('vendor/grimmlink/toastr/build/toastr.min.css', 'public/css'); 19 | mix.copy('vendor/grimmlink/toastr/build/toastr.min.js', 'public/js'); --------------------------------------------------------------------------------