├── public ├── favicon.ico ├── robots.txt ├── images │ ├── product │ │ ├── user.png │ │ └── Greg-Emerson-edit-2.jpg │ └── user │ │ └── avatar1.png ├── .htaccess ├── js │ ├── main.js │ ├── multifield │ │ ├── Gruntfile.js │ │ ├── jquery.multifield.min.js │ │ └── jquery.multifield.js │ └── plugins │ │ ├── dataTables.bootstrap.min.js │ │ └── jquery.vmap.sampledata.js ├── web.config └── index.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── database ├── .gitignore ├── seeds │ ├── DatabaseSeeder.php │ └── UsersTableSeeder.php ├── migrations │ ├── 2019_09_25_123326_create_purchases_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_09_15_053453_create_taxes_table.php │ ├── 2019_09_15_055531_create_units_table.php │ ├── 2019_09_14_134301_create_categories_table.php │ ├── 2019_09_17_043116_create_product_suppliers_table.php │ ├── 2019_09_15_061238_create_suppliers_table.php │ ├── 2019_09_15_065207_create_customers_table.php │ ├── 2019_09_18_180122_create_invoices_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2019_09_15_101601_create_products_table.php │ └── 2019_09_24_071816_create_sales_table.php └── factories │ └── UserFactory.php ├── saleserp.png ├── .gitattributes ├── app ├── Purchase.php ├── Tax.php ├── Unit.php ├── Category.php ├── Customer.php ├── Supplier.php ├── ProductSale.php ├── Sale.php ├── Invoice.php ├── ProductSupplier.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ ├── Authenticate.php │ │ ├── VerifyCsrfToken.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── ResetPasswordController.php │ │ │ ├── VerificationController.php │ │ │ └── RegisterController.php │ │ ├── HomeController.php │ │ ├── TaxController.php │ │ ├── UnitController.php │ │ ├── CategoryController.php │ │ ├── SupplierController.php │ │ └── CustomerController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Product.php ├── Console │ └── Kernel.php ├── User.php └── Exceptions │ └── Handler.php ├── .idea ├── misc.xml └── modules.xml ├── resources ├── sass │ ├── app.scss │ └── _variables.scss ├── views │ ├── home.blade.php │ ├── auth │ │ ├── verify.blade.php │ │ ├── passwords │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── login.blade.php │ │ └── register.blade.php │ ├── partials │ │ └── header.blade.php │ ├── tax │ │ ├── edit.blade.php │ │ ├── create.blade.php │ │ └── index.blade.php │ ├── unit │ │ ├── edit.blade.php │ │ ├── create.blade.php │ │ └── index.blade.php │ ├── category │ │ ├── edit.blade.php │ │ ├── create.blade.php │ │ └── index.blade.php │ ├── welcome.blade.php │ ├── profile │ │ ├── edit_profile.blade.php │ │ └── password.blade.php │ ├── layouts │ │ ├── app.blade.php │ │ └── master.blade.php │ ├── invoice │ │ └── show.blade.php │ ├── purchase │ │ └── show.blade.php │ ├── supplier │ │ └── index.blade.php │ └── customer │ │ ├── index.blade.php │ │ └── create.blade.php ├── lang │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ └── passwords.php └── js │ ├── components │ └── ExampleComponent.vue │ ├── app.js │ └── bootstrap.js ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .gitignore ├── .styleci.yml ├── .editorconfig ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── webpack.mix.js ├── server.php ├── .env.example ├── readme.md ├── config ├── services.php ├── view.php ├── hashing.php ├── broadcasting.php ├── filesystems.php ├── queue.php ├── logging.php ├── cache.php └── auth.php ├── package.json ├── phpunit.xml ├── composer.json └── artisan /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /saleserp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AshrafulRasel/SalesERP/HEAD/saleserp.png -------------------------------------------------------------------------------- /public/images/product/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AshrafulRasel/SalesERP/HEAD/public/images/product/user.png -------------------------------------------------------------------------------- /public/images/user/avatar1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AshrafulRasel/SalesERP/HEAD/public/images/user/avatar1.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /public/images/product/Greg-Emerson-edit-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AshrafulRasel/SalesERP/HEAD/public/images/product/Greg-Emerson-edit-2.jpg -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Purchase.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /app/Unit.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/Customer.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Invoice'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/Supplier.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('titel', 'Home | ') 4 | @section('content') 5 | @include('partials.header') 6 | @include('partials.sidebar') 7 | 8 | @include('partials.content') 9 | 10 | @endsection 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/ProductSale.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Product'); 11 | } 12 | 13 | public function sale(){ 14 | return $this->belongsTo('App\Sale'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Sale.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Invoice'); 11 | } 12 | 13 | public function product(){ 14 | return $this->belongsTo('App\Product'); 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/Invoice.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Sales'); 12 | } 13 | 14 | public function customer(){ 15 | return $this->belongsTo('App\Customer'); 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/ProductSupplier.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Product'); 12 | } 13 | 14 | public function supplier(){ 15 | return $this->belongsTo('App\Supplier'); 16 | } 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'f_name' => "Admin", 16 | 'l_name' => "User", 17 | 'image' => "user.jpg", 18 | 'email' => 'admin@example.com', 19 | 'password' => bcrypt('password'), 20 | ]); 21 | 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /resources/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.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/Product.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Category'); 11 | } 12 | public function unit(){ 13 | return $this->belongsTo('App\Unit'); 14 | } 15 | public function tax(){ 16 | return $this->belongsTo('App\Tax'); 17 | } 18 | 19 | public function additionalProduct(){ 20 | return $this->hasMany('App\ProductSupplier'); 21 | } 22 | 23 | public function sale(){ 24 | return $this->hasMany('App\Sale'); 25 | } 26 | 27 | public function invoice(){ 28 | return $this->belongsToMany('App\Invoice'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2019_09_25_123326_create_purchases_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::dropIfExists('purchases'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /public/js/main.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | var treeviewMenu = $('.app-menu'); 5 | 6 | // Toggle Sidebar 7 | $('[data-toggle="sidebar"]').click(function(event) { 8 | event.preventDefault(); 9 | $('.app').toggleClass('sidenav-toggled'); 10 | }); 11 | 12 | // Activate sidebar treeview toggle 13 | $("[data-toggle='treeview']").click(function(event) { 14 | event.preventDefault(); 15 | if(!$(this).parent().hasClass('is-expanded')) { 16 | treeviewMenu.find("[data-toggle='treeview']").parent().removeClass('is-expanded'); 17 | } 18 | $(this).parent().toggleClass('is-expanded'); 19 | }); 20 | 21 | // Set initial active toggle 22 | $("[data-toggle='treeview.'].is-expanded").parent().toggleClass('is-expanded'); 23 | 24 | //Activate bootstrip tooltips 25 | $("[data-toggle='tooltip']").tooltip(); 26 | 27 | })(); 28 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2019_09_15_053453_create_taxes_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->string('slug'); 20 | $table->boolean('status'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('taxes'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2019_09_15_055531_create_units_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->string('slug'); 20 | $table->boolean('status'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('units'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least eight 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 | -------------------------------------------------------------------------------- /database/migrations/2019_09_14_134301_create_categories_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->string('slug'); 20 | $table->boolean('status'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('categories'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=laravel 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | 33 | AWS_ACCESS_KEY_ID= 34 | AWS_SECRET_ACCESS_KEY= 35 | AWS_DEFAULT_REGION=us-east-1 36 | AWS_BUCKET= 37 | 38 | PUSHER_APP_ID= 39 | PUSHER_APP_KEY= 40 | PUSHER_APP_SECRET= 41 | PUSHER_APP_CLUSTER=mt1 42 | 43 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 44 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 45 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | #Project Overview: 2 | Sales ERP is a Modern and responsive small business management system. Developed by PHP and Laravel, JQery, Ajax, Bootstrap. It is Designed and Develop for thinking shop, small business, company and any types of business. Here has accounting,management, invoice user and Data analysis. 3 | 4 | 5 | 6 | ![saleserp](https://user-images.githubusercontent.com/25568503/65633659-6b83d580-dffe-11e9-90f4-a1083e094165.png) 7 | 8 | ![erp2](https://user-images.githubusercontent.com/25568503/65633750-9e2dce00-dffe-11e9-9653-6a65086e284e.png) 9 | 10 | ![erp23](https://user-images.githubusercontent.com/25568503/65633890-e816b400-dffe-11e9-8442-fb977552d5e6.png) 11 | 12 | ![admin](https://user-images.githubusercontent.com/25568503/65634018-28763200-dfff-11e9-967b-b6ec401147df.png) 13 | 14 | ![login](https://user-images.githubusercontent.com/25568503/65634125-5fe4de80-dfff-11e9-9639-18255ce948b1.png) 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /database/migrations/2019_09_17_043116_create_product_suppliers_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->integer('product_id'); 19 | $table->integer('supplier_id'); 20 | $table->integer('price'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('product_suppliers'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2019_09_15_061238_create_suppliers_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->string('mobile'); 20 | $table->string('address'); 21 | $table->text('details'); 22 | $table->text('previous_balance'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('suppliers'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_09_15_065207_create_customers_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->string('mobile'); 20 | $table->string('address'); 21 | $table->text('details'); 22 | $table->text('previous_balance'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('customers'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 20 | return [ 21 | 'name' => $faker->name, 22 | 'email' => $faker->unique()->safeEmail, 23 | 'email_verified_at' => now(), 24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 25 | 'remember_token' => Str::random(10), 26 | ]; 27 | }); 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_09_18_180122_create_invoices_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->bigInteger('customer_id')->unsigned(); 19 | $table->string('total'); 20 | $table->foreign('customer_id') 21 | ->references('id')->on('customers') 22 | ->onDelete('cascade'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('invoices'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, {{ __('click here to request another') }}. 19 |
20 |
21 |
22 |
23 |
24 | @endsection 25 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | 40 | public function getFullNameAttribute() { 41 | return ucfirst($this->f_name) . ' ' . ucfirst($this->l_name); 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /public/js/multifield/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | grunt.initConfig({ 3 | pkg: grunt.file.readJSON('package.json'), 4 | 5 | jshint: { 6 | options: { 7 | curly: true, 8 | eqeqeq: true, 9 | immed: true, 10 | latedef: true, 11 | newcap: true, 12 | noarg: true, 13 | sub: true, 14 | undef: true, 15 | eqnull: true, 16 | browser: true, 17 | globals: { 18 | jQuery: true, 19 | $: true, 20 | console: true 21 | } 22 | }, 23 | '<%= pkg.name %>': { 24 | src: [ 'src/js/**/*.js' ] 25 | } 26 | }, 27 | 28 | uglify: { 29 | options: { 30 | stripBanners: true, 31 | banner: '/* <%= pkg.name %> - v<%= pkg.version %> - <%= pkg.homepage %> */\n' 32 | }, 33 | 34 | build: { 35 | src: 'jquery.multifield.js', 36 | dest: 'jquery.multifield.min.js' 37 | } 38 | }, 39 | 40 | 41 | }); 42 | 43 | 44 | grunt.loadNpmTasks('grunt-contrib-jshint'); 45 | grunt.loadNpmTasks('grunt-contrib-uglify'); 46 | 47 | 48 | grunt.registerTask('default', ['jshint', 'uglify']); 49 | }; -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('f_name'); 19 | $table->string('l_name'); 20 | $table->string('email')->unique(); 21 | $table->string('image'); 22 | $table->timestamp('email_verified_at')->nullable(); 23 | $table->string('password'); 24 | $table->rememberToken(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('users'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2019_09_15_101601_create_products_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | $table->integer('serial_number'); 20 | $table->string('model'); 21 | $table->integer('category_id'); 22 | $table->string('sales_price'); 23 | $table->integer('unit_id'); 24 | $table->string('image'); 25 | $table->string('tax_id'); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('products'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | 'sparkpost' => [ 34 | 'secret' => env('SPARKPOST_SECRET'), 35 | ], 36 | 37 | ]; 38 | -------------------------------------------------------------------------------- /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' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /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": "npm run development -- --watch", 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 --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19", 14 | "bootstrap": "^4.1.0", 15 | "cross-env": "^5.1", 16 | "jquery": "^3.2", 17 | "laravel-mix": "^4.0.7", 18 | "lodash": "^4.17.13", 19 | "popper.js": "^1.12", 20 | "resolve-url-loader": "^2.3.1", 21 | "sass": "^1.15.2", 22 | "sass-loader": "^7.1.0", 23 | "vue": "^2.5.17" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require('./bootstrap'); 8 | 9 | window.Vue = require('vue'); 10 | 11 | /** 12 | * The following block of code may be used to automatically register your 13 | * Vue components. It will recursively scan this directory for the Vue 14 | * components and automatically register them with their "basename". 15 | * 16 | * Eg. ./components/ExampleComponent.vue -> 17 | */ 18 | 19 | // const files = require.context('./', true, /\.vue$/i); 20 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); 21 | 22 | Vue.component('example-component', require('./components/ExampleComponent.vue').default); 23 | 24 | /** 25 | * Next, we will create a fresh Vue application instance and attach it to 26 | * the page. Then, you may begin adding components to this application 27 | * or customize the JavaScript scaffolding to fit your unique needs. 28 | */ 29 | 30 | const app = new Vue({ 31 | el: '#app', 32 | }); 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 38 | $this->middleware('signed')->only('verify'); 39 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Unit 14 | 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('home'); 19 | Route::get('/edit_profile', 'HomeController@edit_profile')->name('edit_profile'); 20 | Route::POST('/update_profile/{id}', 'HomeController@update_profile')->name('update_profile'); 21 | Route::get('/password_change/', 'HomeController@update_password')->name('update_password'); 22 | 23 | 24 | Route::resource('category', 'CategoryController'); 25 | Route::resource('tax', 'TaxController'); 26 | Route::resource('unit', 'UnitController'); 27 | Route::resource('supplier', 'SupplierController'); 28 | Route::resource('customer', 'CustomerController'); 29 | Route::resource('product', 'ProductController'); 30 | Route::resource('invoice', 'InvoiceController'); 31 | Route::resource('purchase', 'PurchaseController'); 32 | Route::get('/findPrice', 'InvoiceController@findPrice')->name('findPrice'); 33 | -------------------------------------------------------------------------------- /database/migrations/2019_09_24_071816_create_sales_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->bigInteger('invoice_id')->unsigned(); 19 | $table->bigInteger('product_id')->unsigned(); 20 | $table->integer('qty'); 21 | $table->integer('price'); 22 | $table->integer('dis'); 23 | $table->integer('amount'); 24 | $table->foreign('invoice_id') 25 | ->references('id')->on('invoices') 26 | ->onDelete('cascade'); 27 | $table->foreign('product_id') 28 | ->references('id')->on('products') 29 | ->onDelete('cascade'); 30 | $table->timestamps(); 31 | }); 32 | } 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | Schema::dropIfExists('sales'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // encrypted: true 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/views/partials/header.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 23 |
24 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 19 | } 20 | 21 | /** 22 | * Show the application dashboard. 23 | * 24 | * @return \Illuminate\Contracts\Support\Renderable 25 | */ 26 | public function index() 27 | { 28 | return view('home'); 29 | } 30 | 31 | public function edit_profile(){ 32 | return view('profile.edit_profile'); 33 | } 34 | 35 | public function update_profile(Request $request, $id){ 36 | 37 | 38 | $user = User::find($id); 39 | $user->f_name = $request->f_name; 40 | $user->l_name = $request->l_name; 41 | $user->email = $request->email; 42 | 43 | if ($request->hasFile('image')){ 44 | $image_path ="images/user/".$user->image; 45 | if (file_exists($image_path)){ 46 | unlink($image_path); 47 | } 48 | $imageName =request()->image->getClientOriginalName(); 49 | request()->image->move(public_path('images/user/'), $imageName); 50 | $user->image = $imageName; 51 | } 52 | 53 | 54 | 55 | $user->save(); 56 | 57 | return redirect()->back(); 58 | } 59 | 60 | 61 | public function update_password(){ 62 | return view('profile.password'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.1.3", 12 | "fideloper/proxy": "^4.0", 13 | "laravel/framework": "5.8.*", 14 | "laravel/tinker": "^1.0" 15 | }, 16 | "require-dev": { 17 | "beyondcode/laravel-dump-server": "^1.0", 18 | "filp/whoops": "^2.0", 19 | "fzaninotto/faker": "^1.4", 20 | "mockery/mockery": "^1.0", 21 | "nunomaduro/collision": "^3.0", 22 | "phpunit/phpunit": "^7.5" 23 | }, 24 | "config": { 25 | "optimize-autoloader": true, 26 | "preferred-install": "dist", 27 | "sort-packages": true 28 | }, 29 | "extra": { 30 | "laravel": { 31 | "dont-discover": [] 32 | } 33 | }, 34 | "autoload": { 35 | "psr-4": { 36 | "App\\": "app/" 37 | }, 38 | "classmap": [ 39 | "database/seeds", 40 | "database/factories" 41 | ] 42 | }, 43 | "autoload-dev": { 44 | "psr-4": { 45 | "Tests\\": "tests/" 46 | } 47 | }, 48 | "minimum-stability": "dev", 49 | "prefer-stable": true, 50 | "scripts": { 51 | "post-autoload-dump": [ 52 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 53 | "@php artisan package:discover --ansi" 54 | ], 55 | "post-root-package-install": [ 56 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 57 | ], 58 | "post-create-project-cmd": [ 59 | "@php artisan key:generate --ansi" 60 | ] 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /public/js/multifield/jquery.multifield.min.js: -------------------------------------------------------------------------------- 1 | /* jquery-multifield - v2.0.0 - https://github.com/maxkostinevich/jquery-multifield */ 2 | !function(a,b,c,d){var e=function(b,c){this.elem=b,this.$elem=a(b),this.options=c,this.localize_i18n={multiField:{messages:{removeConfirmation:"Are you sure you want to remove this section?"}}},this.metadata=this.$elem.data("mfield-options")};e.prototype={defaults:{max:0,locale:"default"},init:function(){var b=this;return this.config=a.extend({},this.defaults,this.options,this.metadata),"default"!==this.config.locale&&(b.localize_i18n=this.config.locale),this.getSectionsCount()<2&&a(this.config.btnRemove,this.$elem).hide(),this.$elem.on("click",this.config.btnAdd,function(a){a.preventDefault(),b.cloneSection()}),this.$elem.on("click",this.config.btnRemove,function(c){c.preventDefault();var d=a(c.target.closest(b.config.section));b.removeSection(d)}),this},cloneSection:function(){if(0!==this.config.max&&this.getSectionsCount()+1>this.config.max)return!1;var b=a(this.config.section,this.$elem).last().clone().attr("style","").attr("id","").fadeIn("fast");a('input[type!="radio"],textarea',b).each(function(){a(this).val("")}),b.find('input[type="radio"]').each(function(){var b=a(this).attr("name");a(this).attr("name",b.replace(/([0-9]+)/g,1*b.match(/([0-9]+)/g)+1))}),a("input[type=radio]",b).attr("checked",!1),a("img.reset-image-src",b).each(function(){a(this).attr("src","")}),this.$elem.append(b),a(this.config.btnRemove,this.$elem).show()},removeSection:function(b){if(confirm(this.localize_i18n.multiField.messages.removeConfirmation)){var c=this.getSectionsCount();c<=2&&a(this.config.btnRemove,this.$elem).hide(),b.slideUp("fast",function(){a(this).detach()})}},getSectionsCount:function(){return this.$elem.children(this.config.section).length}},e.defaults=e.prototype.defaults,a.fn.multifield=function(a){return this.each(function(){new e(this,a).init()})}}(jQuery,window,document); 3 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/js/plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", 6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper container-fluid dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&& 7 | o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l",{"class":t.sPageButton+" "+g,id:0===r&& 8 | "string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('