├── .env.example ├── .gitignore ├── README.md ├── app ├── Category.php ├── Checkout.php ├── Console │ ├── Commands │ │ └── Inspire.php │ └── Kernel.php ├── Events │ └── Event.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ └── ResetPasswordController.php │ │ ├── CartController.php │ │ ├── CategoryController.php │ │ ├── CheckoutController.php │ │ ├── Controller.php │ │ ├── OrderController.php │ │ ├── PageController.php │ │ ├── PcategoryController.php │ │ ├── PermissionController.php │ │ ├── PostController.php │ │ ├── PosttypeController.php │ │ ├── ProductController.php │ │ ├── RoleController.php │ │ ├── ShopSettingsController.php │ │ └── UserController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── ActiveUserMiddleware.php │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── CreateCategoryRequest.php │ │ ├── CreatePageRequest.php │ │ ├── CreatePcategoryRequest.php │ │ ├── CreatePostRequest.php │ │ ├── CreatePosttypeRequest.php │ │ ├── CreateProductRequest.php │ │ ├── CreateUserRequest.php │ │ ├── PermissionCreateRequest.php │ │ ├── PermissionUpdateRequest.php │ │ ├── Request.php │ │ ├── RoleCreateRequest.php │ │ ├── RoleUpdateRequest.php │ │ ├── ShippingRequest.php │ │ ├── UpdatePosttypeRequest.php │ │ └── UpdateUserRequest.php ├── Jobs │ └── Job.php ├── Listeners │ └── .gitkeep ├── Order.php ├── OrderItem.php ├── Page.php ├── Pcategory.php ├── Permission.php ├── Policies │ └── .gitkeep ├── Post.php ├── Posttype.php ├── Product.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Role.php ├── Shipping.php ├── ShopSetting.php └── User.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cart.php ├── compile.php ├── database.php ├── datatables.php ├── filesystems.php ├── gravatar.php ├── laratrust.php ├── laratrust_seeder.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2016_07_15_144703_entrust_setup_tables.php │ ├── 2016_08_13_074350_AddStatusInUserTable.php │ ├── 2016_08_22_100745_CreatePosttypesTable.php │ ├── 2016_08_22_100820_CreatePostTable.php │ ├── 2016_08_22_111258_AddTimestampsInPosttypeTable.php │ ├── 2016_08_22_111623_AddTimestampsInPostTable.php │ ├── 2016_08_31_093428_CratePageTable.php │ ├── 2016_08_31_115530_AddFeaturedImageInPages.php │ ├── 2016_09_01_102558_CreateCategoriesTable.php │ ├── 2016_09_01_105445_CreateCategoryPostPivotTable.php │ ├── 2016_09_01_110334_AddFeaturedImageInCategoryTable.php │ ├── 2016_09_20_060550_CreateProductCategoryTable.php │ ├── 2016_09_20_090750_CreateProductsTable.php │ ├── 2016_09_20_092428_AddSkuAndPriceInProductTable.php │ ├── 2016_10_17_111432_CreatePcategoriesProductsTabel.php │ ├── 2016_10_24_113534_AddQuantityInProductsTable.php │ ├── 2016_11_07_111219_CreateOrderTable.php │ ├── 2016_11_07_112458_CreateShippingTable.php │ ├── 2016_11_08_104247_CreateOrderitemsTable.php │ ├── 2016_11_10_135559_AddSoftDeleteInOrderTable.php │ ├── 2016_11_11_101206_AddQtyInOrderItemsTable.php │ ├── 2016_11_11_125535_AddStatusInOrderTable.php │ ├── 2016_11_18_122642_CreateShoppingSettingsTable.php │ └── 2017_04_13_121217_laratrust_upgrade_tables.php └── seeds │ ├── .gitkeep │ ├── DatabaseSeeder.php │ ├── LaratrustSeeder.php │ ├── PostTypeTableSeeder.php │ ├── RoleTableSeeder.php │ └── UsersTableSeeder.php ├── gulpfile.js ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ ├── 404.css │ ├── AdminLTE.min.css │ ├── _all-skins.min.css │ ├── blue.css │ ├── blue.png │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── bootstrap3-wysihtml5.min.css │ ├── custom.css │ ├── dataTables.bootstrap.css │ ├── datepicker3.css │ ├── font-awesome.min.css │ ├── ionicons.min.css │ └── jquery-jvectormap-1.2.2.css ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ ├── 1472121675fav.jpg │ ├── 1472122570fav.jpg │ ├── Thumbs.db │ ├── bg.png │ ├── bg1.png │ └── error-img.png ├── index.php ├── js │ ├── Chart.min.js │ ├── app.min.js │ ├── bootstrap-datepicker.js │ ├── bootstrap.min.js │ ├── bootstrap3-wysihtml5.all.min.js │ ├── dataTables.bootstrap.min.js │ ├── demo.js │ ├── fastclick.js │ ├── icheck.min.js │ ├── jquery-2.2.3.min.js │ ├── jquery-jvectormap-1.2.2.min.js │ ├── jquery-jvectormap-world-mill-en.js │ ├── jquery.slimscroll.min.js │ └── jquery.sparkline.min.js ├── robots.txt ├── vendor │ └── datatables │ │ └── buttons.server-side.js └── web.config ├── resources ├── assets │ └── sass │ │ └── app.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── auth │ ├── emails │ │ └── password.blade.php │ ├── login.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ └── reset.blade.php │ └── register.blade.php │ ├── backend │ ├── admin │ │ ├── cart │ │ │ └── index.blade.php │ │ ├── categories │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ └── list.blade.php │ │ ├── checkout │ │ │ └── checkout.blade.php │ │ ├── order │ │ │ ├── list.blade.php │ │ │ ├── refund.blade.php │ │ │ ├── trash.blade.php │ │ │ └── view.blade.php │ │ ├── page │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ ├── list.blade.php │ │ │ └── trash.blade.php │ │ ├── pcategories │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ └── list.blade.php │ │ ├── permission │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ └── list.blade.php │ │ ├── post │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ ├── list.blade.php │ │ │ └── trash.blade.php │ │ ├── posttype │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ └── list.blade.php │ │ ├── product │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ ├── list.blade.php │ │ │ ├── trash.blade.php │ │ │ └── view.blade.php │ │ ├── role │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ └── list.blade.php │ │ ├── shop │ │ │ ├── edit.blade.php │ │ │ ├── settings.blade.php │ │ │ └── view.blade.php │ │ └── users │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ ├── fields.blade.php │ │ │ ├── list.blade.php │ │ │ └── profile.blade.php │ ├── partial │ │ ├── header.blade.php │ │ ├── sidebar.blade.php │ │ └── success.blade.php │ └── scripts.blade.php │ ├── common │ ├── message.blade.php │ └── scripts.blade.php │ ├── errors │ ├── 403.blade.php │ ├── 404.blade.php │ └── 503.blade.php │ ├── frontend │ ├── cart │ │ └── index.blade.php │ ├── checkout │ │ └── checkout.blade.php │ ├── main.blade.php │ ├── products │ │ ├── list.blade.php │ │ └── view.blade.php │ └── scripts.blade.php │ ├── layouts │ └── app.blade.php │ ├── main.blade.php │ └── vendor │ ├── .gitkeep │ ├── datatables │ ├── print.blade.php │ └── script.blade.php │ ├── flash │ ├── message.blade.php │ └── modal.blade.php │ ├── notifications │ ├── email-plain.blade.php │ └── email.blade.php │ └── pagination │ ├── bootstrap-4.blade.php │ ├── default.blade.php │ ├── simple-bootstrap-4.blade.php │ └── simple-default.blade.php ├── routes ├── api.php ├── console.php ├── frontend.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ ├── .gitignore │ │ └── 1492151790_01 (copy).jpg ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore └── tests ├── ExampleTest.php └── TestCase.php /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | APP_URL=http://localhost 5 | 6 | DB_CONNECTION=mysql 7 | DB_HOST=127.0.0.1 8 | DB_PORT=3306 9 | DB_DATABASE=homestead 10 | DB_USERNAME=homestead 11 | DB_PASSWORD=secret 12 | 13 | CACHE_DRIVER=file 14 | SESSION_DRIVER=file 15 | QUEUE_DRIVER=sync 16 | 17 | REDIS_HOST=127.0.0.1 18 | REDIS_PASSWORD=null 19 | REDIS_PORT=6379 20 | 21 | MAIL_DRIVER=smtp 22 | MAIL_HOST=mailtrap.io 23 | MAIL_PORT=2525 24 | MAIL_USERNAME=null 25 | MAIL_PASSWORD=null 26 | MAIL_ENCRYPTION=null 27 | 28 | 29 | MAILGUN_DOMAIN=null 30 | MAILGUN_SECRET=null 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | /public/storage 4 | Homestead.yaml 5 | Homestead.json 6 | nbproject 7 | .env 8 | composer.lock 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is Laravel shopping cart CMS with stripe payment gateway integration. You can use it for post page and product. You can also see orders. This cms fully support L5.4 2 | 3 | 4 | ## Installation Steps: ## 5 | > 1. Clone this repository 6 | > 2. Go to the project folder then run **composer install** 7 | > 3. Copy .env.example file and save as .env file in the same directory 8 | > 4. Run **php artisan key:generate** 9 | > 5. Set database name, database username, database password in .env file 10 | > 6. Run migration: **php artisan migrate** 11 | > 7. Seed the database: **php artisan db:seed** 12 | > 8. Create storage link: **php artisan storage:link** 13 | 14 | ## Shopping cart settings ## 15 | 16 | Go to Dashboard > eShop > Settings > then add Stripe secret key and Stripe public key 17 | 18 | 19 | ## Admin Login Credentials ## 20 | 21 | Url: domainname/login , 22 | Email: admin@admin.com , 23 | Password: admin123 24 | 25 | -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | belongsToMany('App\Post'); 17 | } 18 | 19 | /** 20 | * Moves uploaded file and returns the new filenam 21 | * @param Symfony\Component\HttpFoundation\File\UploadedFile $file upladed file 22 | * @return string new name returned 23 | */ 24 | public function handleFile($request) { 25 | if ($request->hasFile('featuredimage')) { 26 | $fileName = time() . '_' . $request->featuredimage->getClientOriginalName(); 27 | $request->featuredimage->storeAs('public', $fileName); 28 | } else { 29 | $fileName = ''; 30 | } 31 | return $fileName; 32 | } 33 | 34 | /* 35 | * Update uploaded file 36 | */ 37 | 38 | public function updateHandleFile($request, $category) { 39 | if ($request->hasFile('featuredimage') == FALSE) { 40 | $fileName = $category->featuredimage; 41 | } else { 42 | Storage::delete('public/' . $category->featuredimage); 43 | $fileName = time() . '_' . $request->featuredimage->getClientOriginalName(); 44 | $request->featuredimage->storeAs('public', $fileName); 45 | } 46 | return $fileName; 47 | } 48 | 49 | /* 50 | * Create post function 51 | */ 52 | 53 | public function addCategory($input, $category) { 54 | $category->name = $input['name']; 55 | $category->description = $input['description']; 56 | $category->featuredimage = $input['featuredimage']; 57 | $category->save(); 58 | return TRUE; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /app/Checkout.php: -------------------------------------------------------------------------------- 1 | $amount * 100, 13 | "currency" => "usd", 14 | "source" => $stoken, 15 | "description" => "Product purchase", 16 | ]); 17 | return $charges; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | fullUrl())->with( 51 | 'csrf_error', 52 | "Opps! Seems you couldn't submit form for a longtime. Please try again" 53 | ); 54 | } 55 | 56 | /*if ($e instanceof CustomException) { 57 | return response()->view('errors.404', [], 500); 58 | }*/ 59 | 60 | if ($e instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) 61 | return response(view('errors.404'), 404); 62 | 63 | 64 | return parent::render($request, $e); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'logout']); 37 | } 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 | return Validator::make($data, [ 50 | 'name' => 'required|max:255', 51 | 'email' => 'required|email|max:255|unique:users', 52 | 'password' => 'required|min:6|confirmed', 53 | ]); 54 | } 55 | 56 | /** 57 | * Create a new user instance after a valid registration. 58 | * 59 | * @param array $data 60 | * @return User 61 | */ 62 | protected function create(array $data) { 63 | return User::create([ 64 | 'name' => $data['name'], 65 | 'email' => $data['email'], 66 | 'password' => bcrypt($data['password']), 67 | ]); 68 | } 69 | 70 | public function register(Request $request) { 71 | $this->validator($request->all())->validate(); 72 | event(new Registered($user = $this->create($request->all()))); 73 | flash('You can not login until you have activated by administrator.'); 74 | return $this->registered($request, $user) 75 | ? : redirect($this->redirectPath()); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Controllers/CartController.php: -------------------------------------------------------------------------------- 1 | input('id')); 28 | Cart::add(['id' => $product->id, 'name' => $product->product_title, 'qty' => $request->input('qty'), 'price' => $product->price, 'options' => ['image' => $product->product_featuredimage]]); 29 | return redirect('cart'); 30 | } 31 | 32 | /* 33 | * update cart 34 | */ 35 | 36 | public function postUpdateCart(Request $request) { 37 | Cart::update($request->id, $request->qty); 38 | return redirect('cart'); 39 | } 40 | 41 | /* 42 | * Remove cart 43 | */ 44 | 45 | public function getRemoveCartItem($id) { 46 | Cart::remove($id); 47 | return redirect('cart'); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | load('users'); 21 | return view('backend.admin.role.list')->with('roles', $roles); 22 | } 23 | 24 | /** 25 | * Show the form for creating a new resource. 26 | * 27 | * @return \Illuminate\Http\Response 28 | */ 29 | public function create() { 30 | return view('backend.admin.role.create'); 31 | } 32 | 33 | /** 34 | * Store a newly created resource in storage. 35 | * 36 | * @param \Illuminate\Http\Request $request 37 | * @return \Illuminate\Http\Response 38 | */ 39 | public function store(RoleCreateRequest $request) { 40 | $input = $request->all(); 41 | 42 | Role::create($input); 43 | flash('Role created succesfully!'); 44 | return redirect('dashboard/admin/role/create'); 45 | } 46 | 47 | /** 48 | * Display the specified resource. 49 | * 50 | * @param int $id 51 | * @return \Illuminate\Http\Response 52 | */ 53 | public function show($id) { 54 | // 55 | } 56 | 57 | /** 58 | * Show the form for editing the specified resource. 59 | * 60 | * @param int $id 61 | * @return \Illuminate\Http\Response 62 | */ 63 | public function edit($id) { 64 | $role = Role::find($id); 65 | return view('backend.admin.role.edit')->with('role', $role); 66 | } 67 | 68 | /** 69 | * Update the specified resource in storage. 70 | * 71 | * @param \Illuminate\Http\Request $request 72 | * @param int $id 73 | * @return \Illuminate\Http\Response 74 | */ 75 | public function update(RoleUpdateRequest $request, $id) { 76 | $input = $request->all(); 77 | $role = Role::find($id); 78 | $inputs = $role->arrangeInputs($input, $role); 79 | $role->update($inputs); 80 | flash('Role updated succesfully!'); 81 | return redirect('dashboard/admin/role')->with('role', $role); 82 | } 83 | 84 | /** 85 | * Remove the specified resource from storage. 86 | * 87 | * @param int $id 88 | * @return \Illuminate\Http\Response 89 | */ 90 | public function destroy($id) { 91 | // 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 27 | \App\Http\Middleware\EncryptCookies::class, 28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 29 | \Illuminate\Session\Middleware\StartSession::class, 30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 31 | \App\Http\Middleware\VerifyCsrfToken::class, 32 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 33 | ], 34 | 'api' => [ 35 | 'throttle:60,1', 36 | 'bindings', 37 | ], 38 | ]; 39 | 40 | /** 41 | * The application's route middleware. 42 | * 43 | * These middleware may be assigned to groups or used individually. 44 | * 45 | * @var array 46 | */ 47 | protected $routeMiddleware = [ 48 | 'auth' => \App\Http\Middleware\Authenticate::class, 49 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 50 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 51 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 52 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 53 | 'role' => \Laratrust\Middleware\LaratrustRole::class, 54 | 'permission' => \Laratrust\Middleware\LaratrustPermission::class, 55 | 'ability' => \Laratrust\Middleware\LaratrustAbility::class, 56 | 'activeUser' => \App\Http\Middleware\ActiveUserMiddleware::class, 57 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 58 | ]; 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/Http/Middleware/ActiveUserMiddleware.php: -------------------------------------------------------------------------------- 1 | status != 1) { 19 | flash('Your are not activated.'); 20 | return redirect('/login'); 21 | } 22 | return $next($request); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 21 | if ($request->ajax() || $request->wantsJson()) { 22 | return response('Unauthorized.', 401); 23 | } else { 24 | return redirect()->guest('login'); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/login'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 'required', 25 | ]; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/CreatePageRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | 'page_content' => 'required', 27 | 'page_status' => 'required', 28 | 'menu_order' => 'required', 29 | ]; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/CreatePcategoryRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | ]; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Requests/CreatePostRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | 'post_title' => 'required', 27 | 'post_content' => 'required', 28 | 'post_status' => 'required', 29 | 'menu_order' => 'required', 30 | ]; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Requests/CreatePosttypeRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:posttypes,name' 26 | ]; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Requests/CreateProductRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | 'product_content' => 'required', 27 | 'price' => 'required', 28 | 'qty' => 'required', 29 | ]; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/CreateUserRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | 'email' => 'required|unique:users,email', 27 | 'password'=>'required' 28 | ]; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/PermissionCreateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|unique:permissions,name', 28 | 'display_name'=>'required' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/PermissionUpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 28 | 'display_name'=>'required' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/Request.php: -------------------------------------------------------------------------------- 1 | 'required|unique:roles,name', 28 | 'display_name'=>'required' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/RoleUpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 28 | 'display_name'=>'required' 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/ShippingRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | 'customer_email' => 'required', 27 | 'customer_phone' => 'required', 28 | 'country' => 'required', 29 | 'customer_address' => 'required', 30 | 'town' => 'required', 31 | 'state' => 'required', 32 | 'zip' => 'required', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdatePosttypeRequest.php: -------------------------------------------------------------------------------- 1 | 'required' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateUserRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 26 | 'email' => 'required' 27 | ]; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Shipping'); 18 | } 19 | 20 | public function orderitems() { 21 | return $this->hasMany('App\OrderItem'); 22 | } 23 | 24 | public function user() { 25 | return $this->belongsTo('App\User'); 26 | } 27 | 28 | /* 29 | * Refund order in stripe 30 | */ 31 | 32 | public function createRefund($input) { 33 | $refund = Refund::create(['charge' => $input['charge_id']]); 34 | if ($refund->status == 'succeeded') { 35 | return $refund->id; 36 | } else { 37 | return ''; 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/OrderItem.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Order'); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/Page.php: -------------------------------------------------------------------------------- 1 | hasFile('page_featuredimage')) { 24 | $fileName = time() . '_' . $request->page_featuredimage->getClientOriginalName(); 25 | $request->page_featuredimage->storeAs('public', $fileName); 26 | } else { 27 | $fileName = ''; 28 | } 29 | return $fileName; 30 | } 31 | 32 | /* 33 | * Update uploaded file 34 | */ 35 | 36 | public function updateHandleFile($request, $page) { 37 | if ($request->hasFile('page_featuredimage') == FALSE) { 38 | $fileName = $page->page_featuredimage; 39 | } else { 40 | Storage::delete('public/' . $page->page_featuredimage); 41 | $fileName = time() . '_' . $request->page_featuredimage->getClientOriginalName(); 42 | $request->page_featuredimage->storeAs('public', $fileName); 43 | } 44 | return $fileName; 45 | } 46 | 47 | /* 48 | * Create post function 49 | */ 50 | 51 | public function addPage($input, $page) { 52 | $page->page_title = $input['page_title']; 53 | $page->page_content = $input['page_content']; 54 | $page->page_featuredimage = $input['page_featuredimage']; 55 | $page->page_date = ($input['page_date'] == '' ? date("Y-m-d") : $input['page_date']); 56 | $page->page_status = $input['page_status']; 57 | $page->menu_order = $input['menu_order']; 58 | $page->save(); 59 | return TRUE; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /app/Pcategory.php: -------------------------------------------------------------------------------- 1 | belongsToMany('App\Product')->withTimestamps(); 18 | } 19 | 20 | /** 21 | * Moves uploaded file and returns the new filenam 22 | * @param Symfony\Component\HttpFoundation\File\UploadedFile $file upladed file 23 | * @return string new name returned 24 | */ 25 | public function handleFile($request) { 26 | if ($request->hasFile('image')) { 27 | $fileName = time() . '_' . $request->image->getClientOriginalName(); 28 | $request->image->storeAs('public', $fileName); 29 | } else { 30 | $fileName = ''; 31 | } 32 | return $fileName; 33 | } 34 | 35 | /* 36 | * Update uploaded file 37 | */ 38 | 39 | public function updateHandleFile($request, $pcategory) { 40 | if ($request->hasFile('image') == FALSE) { 41 | $fileName = $pcategory->image; 42 | } else { 43 | Storage::delete('public/' . $pcategory->image); 44 | $fileName = time() . '_' . $request->image->getClientOriginalName(); 45 | $request->image->storeAs('public', $fileName); 46 | } 47 | return $fileName; 48 | } 49 | 50 | /* 51 | * Create category function 52 | */ 53 | 54 | public function addPcategory($input, $pcategory) { 55 | $pcategory->name = $input['name']; 56 | $pcategory->description = $input['description']; 57 | $pcategory->image = $input['image']; 58 | $pcategory->save(); 59 | return TRUE; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /app/Permission.php: -------------------------------------------------------------------------------- 1 | name == $input['name']) { 18 | unset($input['name']); 19 | } 20 | return $input; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/Policies/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/Post.php: -------------------------------------------------------------------------------- 1 | hasFile('post_featuredimage')) { 24 | $fileName = time() . '_' . $request->post_featuredimage->getClientOriginalName(); 25 | $request->post_featuredimage->storeAs('public', $fileName); 26 | } else { 27 | $fileName = ''; 28 | } 29 | return $fileName; 30 | } 31 | 32 | /* 33 | * Update uploaded file 34 | */ 35 | 36 | public static function updateHandleFile($request, $post) { 37 | if ($request->hasFile('post_featuredimage') == FALSE) { 38 | $fileName = $post->post_featuredimage; 39 | } else { 40 | Storage::delete('public/' . $post->post_featuredimage); 41 | $fileName = time() . '_' . $request->post_featuredimage->getClientOriginalName(); 42 | $request->post_featuredimage->storeAs('public', $fileName); 43 | } 44 | return $fileName; 45 | } 46 | 47 | /* 48 | * Posttytpe Relation one to many 49 | */ 50 | 51 | public function posttypes() { 52 | return $this->belongsTo('App\Posttype', 'posttype_id'); 53 | } 54 | 55 | /* 56 | * Create post function 57 | */ 58 | 59 | public static function addPost($input, $post, $posttype) { 60 | $post->post_title = $input['post_title']; 61 | $post->post_content = $input['post_content']; 62 | $post->post_excerpt = $input['post_excerpt']; 63 | $post->post_featuredimage = $input['post_featuredimage']; 64 | $post->post_date = ($input['post_date'] == '' ? date("Y-m-d") : $input['post_date']); 65 | $post->post_status = $input['post_status']; 66 | $post->menu_order = $input['menu_order']; 67 | $addedPost=$posttype->posts()->save($post); 68 | return $addedPost; 69 | } 70 | 71 | /** 72 | * The categories that belong to the user. 73 | */ 74 | public function categories() { 75 | return $this->belongsToMany('App\Category'); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/Posttype.php: -------------------------------------------------------------------------------- 1 | $name . 'Controller', '--resource' => true]); 18 | return true; 19 | } 20 | 21 | /* 22 | * post Relation one to many 23 | */ 24 | 25 | public function posts() { 26 | return $this->hasMany('App\Post'); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any application authentication / authorization services. 21 | * 22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate 23 | * @return void 24 | */ 25 | public function boot(GateContract $gate) 26 | { 27 | $this->registerPolicies($gate); 28 | 29 | // 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | id === (int) $userId; 23 | }); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.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 | parent::boot(); 28 | 29 | // 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapWebRoutes(); 37 | 38 | $this->mapApiRoutes(); 39 | 40 | // 41 | } 42 | 43 | /** 44 | * Define the "web" routes for the application. 45 | * 46 | * These routes all receive session state, CSRF protection, etc. 47 | * 48 | * @return void 49 | */ 50 | protected function mapWebRoutes() { 51 | Route::group([ 52 | 'middleware' => 'web', 53 | 'namespace' => $this->namespace, 54 | ], function ($router) { 55 | require base_path('routes/web.php'); 56 | }); 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 | Route::group([ 68 | 'middleware' => 'api', 69 | 'namespace' => $this->namespace, 70 | 'prefix' => 'api', 71 | ], function ($router) { 72 | require base_path('routes/api.php'); 73 | }); 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/Role.php: -------------------------------------------------------------------------------- 1 | belongsToMany('App\User'); 17 | } 18 | 19 | /* 20 | * Arrange inputs for update 21 | * return array 22 | */ 23 | 24 | public function arrangeInputs($input, $role) { 25 | if ($role->name == $input['name']) { 26 | unset($input['name']); 27 | } 28 | return $input; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/Shipping.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Order'); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/ShopSetting.php: -------------------------------------------------------------------------------- 1 | email == $input['email']) { 43 | unset($input['email']); 44 | } 45 | if ($input['password'] != '') { 46 | $input['password'] = Hash::make($input['password']); 47 | } else { 48 | unset($input['password']); 49 | } 50 | $user->update($input); 51 | return true; 52 | } 53 | 54 | /* 55 | * Attach user to a specfic role 56 | * method post 57 | */ 58 | 59 | public function attachUser($input, $user) { 60 | if ($user->roles->count() > 0) { 61 | if ($user->hasRole(Role::find($input['roles'])->name) == false) { 62 | $user->detachRoles($user->roles); 63 | $user->roles()->attach($input['roles']); 64 | } 65 | } else { 66 | $user->roles()->attach($input['roles']); 67 | } 68 | return true; 69 | } 70 | 71 | /* 72 | * show list of availble roles 73 | */ 74 | 75 | public function roleList() { 76 | $roles = array(); 77 | foreach ((Role::all()) as $role) { 78 | $roles[$role->id] = $role->name; 79 | } 80 | return $roles; 81 | } 82 | 83 | /* 84 | * Many to many relation with roles 85 | */ 86 | 87 | public function roles() { 88 | return $this->belongsToMany('App\Role'); 89 | } 90 | 91 | public function orders() { 92 | return $this->hasMany('App\Order'); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 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.5.9", 9 | "laravel/framework": "5.4.*", 10 | "santigarcor/laratrust": "3.2.*", 11 | "laravelcollective/html": "^5.3.0", 12 | "laracasts/flash": "^2.0", 13 | "thomaswelton/laravel-gravatar": "~1.0", 14 | "guzzlehttp/guzzle": "~5.3|~6.0", 15 | "yajra/laravel-datatables-oracle": "^7.3", 16 | "gloudemans/shoppingcart": "^2.2", 17 | "laravel/cashier": "~7.0", 18 | "yajra/laravel-datatables-buttons": "^1.2" 19 | }, 20 | "require-dev": { 21 | "fzaninotto/faker": "~1.4", 22 | "mockery/mockery": "0.9.*", 23 | "phpunit/phpunit": "~5.7", 24 | "symfony/css-selector": "2.8.*|3.0.*", 25 | "symfony/dom-crawler": "2.8.*|3.0.*" 26 | }, 27 | "autoload": { 28 | "classmap": [ 29 | "database" 30 | ], 31 | "psr-4": { 32 | "App\\": "app/" 33 | } 34 | }, 35 | "autoload-dev": { 36 | "classmap": [ 37 | "tests/TestCase.php" 38 | ] 39 | }, 40 | "scripts": { 41 | "post-root-package-install": [ 42 | "php -r \"copy('.env.example', '.env');\"" 43 | ], 44 | "post-create-project-cmd": [ 45 | "php artisan key:generate" 46 | ], 47 | "post-install-cmd": [ 48 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 49 | "php artisan optimize" 50 | ], 51 | "post-update-cmd": [ 52 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 53 | "php artisan optimize" 54 | ] 55 | }, 56 | "config": { 57 | "preferred-install": "dist" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Broadcast Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the broadcast connections that will be used 24 | | to broadcast events to other systems or over websockets. Samples of 25 | | each available type of connection are provided inside this array. 26 | | 27 | */ 28 | 29 | 'connections' => [ 30 | 31 | 'pusher' => [ 32 | 'driver' => 'pusher', 33 | 'key' => env('PUSHER_KEY'), 34 | 'secret' => env('PUSHER_SECRET'), 35 | 'app_id' => env('PUSHER_APP_ID'), 36 | 'options' => [ 37 | // 38 | ], 39 | ], 40 | 41 | 'redis' => [ 42 | 'driver' => 'redis', 43 | 'connection' => 'default', 44 | ], 45 | 46 | 'log' => [ 47 | 'driver' => 'log', 48 | ], 49 | 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc', 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array', 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path('framework/cache'), 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 55 | 'port' => env('MEMCACHED_PORT', 11211), 56 | 'weight' => 100, 57 | ], 58 | ], 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | ], 65 | 66 | ], 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Cache Key Prefix 71 | |-------------------------------------------------------------------------- 72 | | 73 | | When utilizing a RAM based store such as APC or Memcached, there might 74 | | be other applications utilizing the same cache. So, we'll specify a 75 | | value to get prefixed to all our keys so we can avoid collisions. 76 | | 77 | */ 78 | 79 | 'prefix' => 'laravel', 80 | 81 | ]; 82 | -------------------------------------------------------------------------------- /config/cart.php: -------------------------------------------------------------------------------- 1 | 0, 5 | ]; 6 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /config/datatables.php: -------------------------------------------------------------------------------- 1 | [ 8 | /** 9 | * Smart search will enclose search keyword with wildcard string "%keyword%". 10 | * SQL: column LIKE "%keyword%" 11 | */ 12 | 'smart' => true, 13 | 14 | /** 15 | * Case insensitive will search the keyword in lower case format. 16 | * SQL: LOWER(column) LIKE LOWER(keyword) 17 | */ 18 | 'case_insensitive' => true, 19 | 20 | /** 21 | * Wild card will add "%" in between every characters of the keyword. 22 | * SQL: column LIKE "%k%e%y%w%o%r%d%" 23 | */ 24 | 'use_wildcards' => false, 25 | ], 26 | 27 | /** 28 | * DataTables internal index id response column name. 29 | */ 30 | 'index_column' => 'DT_Row_Index', 31 | 32 | /** 33 | * DataTables fractal configurations. 34 | */ 35 | 'fractal' => [ 36 | /** 37 | * Request key name to parse includes on fractal. 38 | */ 39 | 'includes' => 'include', 40 | 41 | /** 42 | * Default fractal serializer. 43 | */ 44 | 'serializer' => League\Fractal\Serializer\DataArraySerializer::class, 45 | ], 46 | 47 | /** 48 | * Datatables list of available engines. 49 | * This is where you can register your custom datatables engine. 50 | */ 51 | 'engines' => [ 52 | 'eloquent' => Yajra\Datatables\Engines\EloquentEngine::class, 53 | 'query' => Yajra\Datatables\Engines\QueryBuilderEngine::class, 54 | 'collection' => Yajra\Datatables\Engines\CollectionEngine::class, 55 | ], 56 | 57 | /** 58 | * Datatables accepted builder to engine mapping. 59 | */ 60 | 'builders' => [ 61 | Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent', 62 | Illuminate\Database\Eloquent\Builder::class => 'eloquent', 63 | Illuminate\Database\Query\Builder::class => 'query', 64 | Illuminate\Support\Collection::class => 'collection', 65 | ], 66 | 67 | /** 68 | * Nulls last sql pattern for Posgresql & Oracle. 69 | * For MySQL, use '-%s %s' 70 | */ 71 | 'nulls_last_sql' => '%s %s NULLS LAST', 72 | ]; 73 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/gravatar.php: -------------------------------------------------------------------------------- 1 | 80, 6 | 7 | // --- The default avatar to display if we have no results 8 | // (bool) false 9 | // (string) 404 10 | // (string) mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash). 11 | // (string) identicon: a geometric pattern based on an email hash. 12 | // (string) monsterid: a generated 'monster' with different colors, faces, etc. 13 | // (string) wavatar: generated faces with differing features and backgrounds. 14 | // (string) retro: awesome generated, 8-bit arcade-style pixelated faces. 15 | 'default' => 'identicon', 16 | 17 | // --- Set the type of avatars we allow to show 18 | // - g: suitable for display on all websites with any audience type. 19 | // - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence. 20 | // - r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use. 21 | // - x: may contain hardcore sexual imagery or extremely disturbing violence. 22 | 'maxRating' => 'g' 23 | ); 24 | -------------------------------------------------------------------------------- /config/laratrust_seeder.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'superadministrator' => [ 6 | 'users' => 'c,r,u,d', 7 | 'acl' => 'c,r,u,d', 8 | 'profile' => 'r,u' 9 | ], 10 | 'administrator' => [ 11 | 'users' => 'c,r,u,d', 12 | 'profile' => 'r,u' 13 | ], 14 | 'user' => [ 15 | 'profile' => 'r,u' 16 | ], 17 | ], 18 | 'permissions_map' => [ 19 | 'c' => 'create', 20 | 'r' => 'read', 21 | 'u' => 'update', 22 | 'd' => 'delete' 23 | ] 24 | ]; 25 | -------------------------------------------------------------------------------- /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/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->safeEmail, 18 | 'password' => bcrypt(str_random(10)), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); 22 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('email')->unique(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('users'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 17 | $table->string('token')->index(); 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_07_15_144703_entrust_setup_tables.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name')->unique(); 18 | $table->string('display_name')->nullable(); 19 | $table->string('description')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | 23 | // Create table for associating roles to users (Many-to-Many) 24 | Schema::create('role_user', function (Blueprint $table) { 25 | $table->integer('user_id')->unsigned(); 26 | $table->integer('role_id')->unsigned(); 27 | 28 | $table->foreign('user_id')->references('id')->on('users') 29 | ->onUpdate('cascade')->onDelete('cascade'); 30 | $table->foreign('role_id')->references('id')->on('roles') 31 | ->onUpdate('cascade')->onDelete('cascade'); 32 | 33 | $table->primary(['user_id', 'role_id']); 34 | }); 35 | 36 | // Create table for storing permissions 37 | Schema::create('permissions', function (Blueprint $table) { 38 | $table->increments('id'); 39 | $table->string('name')->unique(); 40 | $table->string('display_name')->nullable(); 41 | $table->string('description')->nullable(); 42 | $table->timestamps(); 43 | }); 44 | 45 | // Create table for associating permissions to roles (Many-to-Many) 46 | Schema::create('permission_role', function (Blueprint $table) { 47 | $table->integer('permission_id')->unsigned(); 48 | $table->integer('role_id')->unsigned(); 49 | 50 | $table->foreign('permission_id')->references('id')->on('permissions') 51 | ->onUpdate('cascade')->onDelete('cascade'); 52 | $table->foreign('role_id')->references('id')->on('roles') 53 | ->onUpdate('cascade')->onDelete('cascade'); 54 | 55 | $table->primary(['permission_id', 'role_id']); 56 | }); 57 | } 58 | 59 | /** 60 | * Reverse the migrations. 61 | * 62 | * @return void 63 | */ 64 | public function down() 65 | { 66 | Schema::drop('permission_role'); 67 | Schema::drop('permissions'); 68 | Schema::drop('role_user'); 69 | Schema::drop('roles'); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /database/migrations/2016_08_13_074350_AddStatusInUserTable.php: -------------------------------------------------------------------------------- 1 | boolean('status'); 16 | }); 17 | } 18 | 19 | /** 20 | * Reverse the migrations. 21 | * 22 | * @return void 23 | */ 24 | public function down() { 25 | Schema::table('users', function (Blueprint $table) { 26 | $table->dropColumn('status'); 27 | }); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2016_08_22_100745_CreatePosttypesTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 16 | $table->text('name'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::drop('posttypes'); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /database/migrations/2016_08_22_100820_CreatePostTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 16 | $table->integer('posttype_id')->unsigned(); 17 | $table->foreign('posttype_id') 18 | ->references('id')->on('posttypes')->onDelete('cascade'); 19 | $table->text('post_title'); 20 | $table->text('post_content'); 21 | $table->text('post_excerpt'); 22 | $table->text('post_featuredimage'); 23 | $table->dateTime('post_date'); 24 | $table->text('post_status'); 25 | $table->integer('menu_order'); 26 | $table->softDeletes(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() { 36 | Schema::drop('posts'); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2016_08_22_111258_AddTimestampsInPosttypeTable.php: -------------------------------------------------------------------------------- 1 | timestamps(); 16 | }); 17 | } 18 | 19 | /** 20 | * Reverse the migrations. 21 | * 22 | * @return void 23 | */ 24 | public function down() { 25 | Schema::table('posttypes', function (Blueprint $table) { 26 | $table->dropTimestamps(); 27 | }); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2016_08_22_111623_AddTimestampsInPostTable.php: -------------------------------------------------------------------------------- 1 | timestamps(); 16 | }); 17 | } 18 | 19 | /** 20 | * Reverse the migrations. 21 | * 22 | * @return void 23 | */ 24 | public function down() { 25 | Schema::table('posts', function (Blueprint $table) { 26 | $table->dropTimestamps(); 27 | }); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2016_08_31_093428_CratePageTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->text('page_title'); 18 | $table->text('page_content'); 19 | $table->text('page_date'); 20 | $table->text('page_status'); 21 | $table->integer('menu_order'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() { 33 | Schema::drop('pages'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2016_08_31_115530_AddFeaturedImageInPages.php: -------------------------------------------------------------------------------- 1 | text('page_featuredimage'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::table('pages', function (Blueprint $table) { 27 | $table->dropColumn('page_featuredimage'); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_09_01_102558_CreateCategoriesTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->text('name'); 18 | $table->text('description'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() { 29 | Schema::drop('categories'); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2016_09_01_105445_CreateCategoryPostPivotTable.php: -------------------------------------------------------------------------------- 1 | integer('category_id')->unsigned()->nullable(); 17 | $table->foreign('category_id')->references('id') 18 | ->on('categories')->onDelete('cascade'); 19 | $table->integer('post_id')->unsigned()->nullable(); 20 | $table->foreign('post_id')->references('id') 21 | ->on('posts')->onDelete('cascade'); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() { 32 | Schema::drop('category_post'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2016_09_01_110334_AddFeaturedImageInCategoryTable.php: -------------------------------------------------------------------------------- 1 | text('featuredimage'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::table('categories', function (Blueprint $table) { 27 | $table->dropColumn('featuredimage'); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_09_20_060550_CreateProductCategoryTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->text('name'); 18 | $table->text('description'); 19 | $table->text('image'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() { 30 | Schema::drop('pcategories'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2016_09_20_090750_CreateProductsTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->text('product_title'); 18 | $table->text('product_content'); 19 | $table->text('product_date'); 20 | $table->text('product_status'); 21 | $table->integer('menu_order'); 22 | $table->text('product_featuredimage'); 23 | $table->text('product_excerpt'); 24 | $table->softDeletes(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() { 35 | Schema::drop('products'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2016_09_20_092428_AddSkuAndPriceInProductTable.php: -------------------------------------------------------------------------------- 1 | text('sku'); 17 | $table->bigInteger('price'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() { 27 | Schema::table('products', function (Blueprint $table) { 28 | $table->dropColumn('sku'); 29 | $table->dropColumn('price'); 30 | }); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2016_10_17_111432_CreatePcategoriesProductsTabel.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('pcategory_id')->unsigned()->nullable(); 18 | $table->foreign('pcategory_id')->references('id') 19 | ->on('pcategories')->onDelete('cascade'); 20 | $table->integer('product_id')->unsigned()->nullable(); 21 | $table->foreign('product_id')->references('id') 22 | ->on('products')->onDelete('cascade'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() { 33 | Schema::dropIfExists('pcategory_product'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2016_10_24_113534_AddQuantityInProductsTable.php: -------------------------------------------------------------------------------- 1 | text('qty'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::table('products', function (Blueprint $table) { 27 | $table->dropColumn('qty'); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_11_07_111219_CreateOrderTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('user_id')->unsigned(); 18 | $table->foreign('user_id')->references('id')->on('users') 19 | ->onUpdate('cascade')->onDelete('cascade'); 20 | $table->text('payment_type'); 21 | $table->text('price'); 22 | $table->text('chargeid'); 23 | $table->text('refund'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() { 34 | Schema::dropIfExists('orders'); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2016_11_07_112458_CreateShippingTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('order_id')->unsigned(); 18 | $table->foreign('order_id')->references('id')->on('orders') 19 | ->onUpdate('cascade')->onDelete('cascade'); 20 | $table->text('first_name'); 21 | $table->text('last_name'); 22 | $table->text('customer_email'); 23 | $table->text('customer_phone'); 24 | $table->text('country'); 25 | $table->text('customer_address'); 26 | $table->text('town'); 27 | $table->text('state'); 28 | $table->text('zip'); 29 | $table->timestamps(); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() { 39 | Schema::dropIfExists('shippings'); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2016_11_08_104247_CreateOrderitemsTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('order_id')->unsigned(); 18 | $table->foreign('order_id')->references('id')->on('orders') 19 | ->onUpdate('cascade')->onDelete('cascade'); 20 | $table->integer('product_id'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() { 31 | Schema::dropIfExists('orderitems'); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2016_11_10_135559_AddSoftDeleteInOrderTable.php: -------------------------------------------------------------------------------- 1 | softDeletes(); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::table('orders', function (Blueprint $table) { 27 | $table->dropColumn('deleted_at'); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_11_11_101206_AddQtyInOrderItemsTable.php: -------------------------------------------------------------------------------- 1 | bigInteger('qty'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::table('orderitems', function (Blueprint $table) { 27 | $table->dropColumn('qty'); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_11_11_125535_AddStatusInOrderTable.php: -------------------------------------------------------------------------------- 1 | text('status'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | * 23 | * @return void 24 | */ 25 | public function down() { 26 | Schema::table('orders', function (Blueprint $table) { 27 | $table->dropColumn('orders'); 28 | }); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_11_18_122642_CreateShoppingSettingsTable.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->text('stripe_secret_key'); 18 | $table->text('stripe_public_key'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() { 29 | Schema::dropIfExists('eshopsettings'); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_04_13_121217_laratrust_upgrade_tables.php: -------------------------------------------------------------------------------- 1 | integer('permission_id')->unsigned(); 17 | $table->integer('user_id')->unsigned(); 18 | 19 | $table->foreign('permission_id')->references('id')->on('permissions') 20 | ->onUpdate('cascade')->onDelete('cascade'); 21 | $table->foreign('user_id')->references('id')->on('users') 22 | ->onUpdate('cascade')->onDelete('cascade'); 23 | 24 | $table->primary(['permission_id', 'user_id']); 25 | }); 26 | 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('permission_user'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(RoleTableSeeder::class); 14 | $this->call(UsersTableSeeder::class); 15 | $this->call(PostTypeTableSeeder::class); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /database/seeds/PostTypeTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Post', 15 | ]); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /database/seeds/RoleTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'admin', 17 | 'display_name' => 'Admin', 18 | 'Description' => 'This is admin role.' 19 | ]); 20 | Role::create( 21 | [ 22 | 'name' => 'author', 23 | 'display_name' => 'Author', 24 | 'Description' => 'This is author role.' 25 | ] 26 | ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Admin', 17 | 'email' => 'admin@admin.com', 18 | 'password' => Hash::make('admin123'), 19 | 'status' => 1, 20 | ]); 21 | $admin->roles()->attach(1); 22 | 23 | $author = User::create([ 24 | 'name' => 'Author', 25 | 'email' => 'author@author.com', 26 | 'password' => Hash::make('author123'), 27 | 'status' => 1, 28 | ]); 29 | $author->roles()->attach(2); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Elixir Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for our application, as well as publishing vendor resources. 11 | | 12 | */ 13 | 14 | elixir(function(mix) { 15 | mix.sass('app.scss'); 16 | }); 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "prod": "gulp --production", 5 | "dev": "gulp watch" 6 | }, 7 | "devDependencies": { 8 | "gulp": "^3.9.1", 9 | "laravel-elixir": "^5.0.0", 10 | "bootstrap-sass": "^3.0.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | ./app/Http/routes.php 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /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/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_square-blue, 4 | .iradio_square-blue { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(blue.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-blue { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-blue.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-blue.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-blue.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-blue.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-blue { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-blue.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-blue.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-blue.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-blue.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* Retina support */ 52 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 53 | only screen and (-moz-min-device-pixel-ratio: 1.5), 54 | only screen and (-o-min-device-pixel-ratio: 3/2), 55 | only screen and (min-device-pixel-ratio: 1.5) { 56 | .icheckbox_square-blue, 57 | .iradio_square-blue { 58 | background-image: url(blue@2x.png); 59 | -webkit-background-size: 240px 24px; 60 | background-size: 240px 24px; 61 | } 62 | } -------------------------------------------------------------------------------- /public/css/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/css/blue.png -------------------------------------------------------------------------------- /public/css/bootstrap3-wysihtml5.min.css: -------------------------------------------------------------------------------- 1 | /*! bootstrap3-wysihtml5-bower 2014-09-26 */ 2 | 3 | ul.wysihtml5-toolbar{margin:0;padding:0;display:block}ul.wysihtml5-toolbar::after{clear:both;display:table;content:""}ul.wysihtml5-toolbar>li{float:left;display:list-item;list-style:none;margin:0 5px 10px 0}ul.wysihtml5-toolbar a[data-wysihtml5-command=bold]{font-weight:700}ul.wysihtml5-toolbar a[data-wysihtml5-command=italic]{font-style:italic}ul.wysihtml5-toolbar a[data-wysihtml5-command=underline]{text-decoration:underline}ul.wysihtml5-toolbar a.btn.wysihtml5-command-active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#D9D9D9;outline:0}ul.wysihtml5-commands-disabled .dropdown-menu{display:none!important}ul.wysihtml5-toolbar div.wysihtml5-colors{display:block;width:50px;height:20px;margin-top:2px;margin-left:5px;position:absolute;pointer-events:none}ul.wysihtml5-toolbar a.wysihtml5-colors-title{padding-left:70px}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=black]{background:#000!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=silver]{background:silver!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=gray]{background:gray!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=maroon]{background:maroon!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=red]{background:red!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=purple]{background:purple!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=green]{background:green!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=olive]{background:olive!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=navy]{background:navy!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=blue]{background:#00f!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=orange]{background:orange!important}.glyphicon-quote:before{content:"\201C";font-family:Georgia,serif;font-size:50px;position:absolute;top:-4px;left:-3px;max-height:100%}.glyphicon-quote:after{content:"\0000a0"} -------------------------------------------------------------------------------- /public/css/custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | To change this license header, choose License Headers in Project Properties. 3 | To change this template file, choose Tools | Templates 4 | and open the template in the editor. 5 | */ 6 | /* 7 | Created on : 11 Aug, 2016, 5:38:03 PM 8 | Author : dev-27 9 | */ 10 | 11 | .form-horizontal .form-group { 12 | margin-right: 0; 13 | margin-left: 0; 14 | } 15 | .btn-primary{ 16 | margin-right: 6px; 17 | } 18 | .product-img{width: 100%;} 19 | .uploaded-img img { 20 | width: 100%; 21 | margin-bottom: 20px; 22 | } 23 | span.large{ 24 | font-weight: bold; 25 | } 26 | .small-img{ 27 | width:30%; 28 | } 29 | hr.shila-border { 30 | border-top: 3px double #8c8b8b; 31 | } 32 | .cart-table tfoot { 33 | border-top: 2px solid #fff; 34 | } 35 | .cart-table .cart-total{ 36 | text-align: center; 37 | font-size: 20px; 38 | font-weight: bold; 39 | border-bottom: 2px solid #fff; 40 | } 41 | .column-background{ 42 | background-color: #fff; 43 | margin-bottom: 15px; 44 | margin-right: 15px; 45 | padding-bottom: 10px; 46 | } 47 | .order-details .thumb{ 48 | width:10%; 49 | } 50 | .credit-card-form{ 51 | display: none; 52 | } 53 | .payment-group { 54 | background: #fff; 55 | padding: 11px; 56 | margin-bottom: 12px; 57 | border-radius: 10px; 58 | } 59 | .out-of-stock{ 60 | color:#ff0000; 61 | font-weight: bold; 62 | } 63 | .range-dropdown select { 64 | width: 3.9em; 65 | height: 50px; 66 | background: rgba(0, 0, 0, 0.2) !important; 67 | border: none; 68 | padding: 7px; 69 | color: #fff; 70 | } 71 | .shop-list .small-box:hover { 72 | color: inherit; 73 | } 74 | .shop-list .small-box img{ 75 | width: 100%; 76 | } 77 | -------------------------------------------------------------------------------- /public/css/jquery-jvectormap-1.2.2.css: -------------------------------------------------------------------------------- 1 | .jvectormap-label { 2 | position: absolute; 3 | display: none; 4 | border: solid 1px #CDCDCD; 5 | -webkit-border-radius: 3px; 6 | -moz-border-radius: 3px; 7 | border-radius: 3px; 8 | background: #292929; 9 | color: white; 10 | font-size: 10px!important; 11 | padding: 3px; 12 | z-index: 9999; 13 | } 14 | 15 | .jvectormap-zoomin, .jvectormap-zoomout { 16 | position: absolute; 17 | top: 100%; 18 | margin-top: -25px; 19 | -webkit-border-radius: 2px; 20 | -moz-border-radius: 2px; 21 | border-radius: 2px; 22 | background: #d2d6de;//rgba(0,0,0,0.4); 23 | padding: 5px; 24 | color: #444; 25 | cursor: pointer; 26 | line-height: 10px; 27 | text-align: center; 28 | font-weight: bold; 29 | box-shadow: 0 1px 2px rgba(0,0,0,0.2); 30 | } 31 | 32 | .jvectormap-zoomin { 33 | left: 100%; 34 | margin-left: -50px; 35 | } 36 | 37 | .jvectormap-zoomout { 38 | left: 100%; 39 | margin-left: -30px; 40 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/images/1472121675fav.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/images/1472121675fav.jpg -------------------------------------------------------------------------------- /public/images/1472122570fav.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/images/1472122570fav.jpg -------------------------------------------------------------------------------- /public/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/images/Thumbs.db -------------------------------------------------------------------------------- /public/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/images/bg.png -------------------------------------------------------------------------------- /public/images/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/images/bg1.png -------------------------------------------------------------------------------- /public/images/error-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/public/images/error-img.png -------------------------------------------------------------------------------- /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 nice 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/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault(); 6 | b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k",{"class":u.sPageButton+" "+ 7 | f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html(' 35 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/default.blade.php: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | user(); 18 | })->middleware('auth:api'); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | }); 19 | -------------------------------------------------------------------------------- /routes/frontend.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/app/public/1492151790_01 (copy).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itobuz/shila-laravel-backend/df5824fda0ae7b74d8ab33404837f88fca0ef268/storage/app/public/1492151790_01 (copy).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 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | visit('/') 17 | ->see('Laravel 5'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); 22 | 23 | return $app; 24 | } 25 | } 26 | --------------------------------------------------------------------------------