Skip to content

Commit

Permalink
Merge pull request #277 from avored/dev
Browse files Browse the repository at this point in the history
merging dev to master
  • Loading branch information
indpurvesh authored Nov 2, 2018
2 parents 55f5b27 + 7ef0e88 commit ad03166
Show file tree
Hide file tree
Showing 83 changed files with 113,455 additions and 14,116 deletions.
5 changes: 2 additions & 3 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ class Controller extends BaseController
public function __construct()
{
if (Schema::hasTable('configurations')) {
$themeViewPath = realpath(Configuration::getConfiguration('active_theme_path'));

$themeViewPath = Configuration::getConfiguration('active_theme_path');
$fileViewFinder = View::getFinder();
$fileViewFinder->prependLocation($themeViewPath);
$fileViewFinder->prependLocation(base_path($themeViewPath));
}
}
}
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use App\Http\ViewComposers\CheckoutComposer;
use App\Http\ViewComposers\MyAccountSidebarComposer;
use App\Http\ViewComposers\LayoutAppComposer;
use AvoRed\Framework\Menu\Facade as MenuFacade;
use AvoRed\Framework\Menu\Facades\Menu as MenuFacade;
use AvoRed\Framework\Menu\Menu;

class AppServiceProvider extends ServiceProvider
Expand Down
4 changes: 2 additions & 2 deletions avored.admin.webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ let mix = require('laravel-mix');
mix.config.fileLoaderDirs.fonts = 'vendor/avored-admin/fonts';
mix.config.fileLoaderDirs.images = 'vendor/avored-admin/images';

mix.js('vendor/avored/framework/resources/assets/js/app.js', 'public/vendor/avored-admin/js')
.sass('vendor/avored/framework/resources/assets/sass/app.scss', 'public/vendor/avored-admin/css')
mix.js('packages/framework/resources/assets/js/app.js', 'public/vendor/avored-admin/js')
.sass('packages/framework/resources/assets/sass/app.scss', 'public/vendor/avored-admin/css')
// .copyDirectory('vendor/avored/framework/resources/assets/static/images','public/vendor/avored-admin/images');
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"type" : "project",
"require" : {
"php": ">=7.1.3",
"avored/dummy-data": "~2.0",
"andreasindal/laravel-markdown": "^3.0",
"avored/framework": "~2.3",
"avored/module-installer": "1.*",
"fabpot/goutte": "^3.2",
Expand All @@ -35,7 +35,8 @@
"autoload" : {
"classmap" : [
"database/seeds",
"database/factories"
"database/factories",
"modules/avored/dummy-data/database/seeds"
],
"psr-4" : {
"App\\" : "app/"
Expand All @@ -49,8 +50,7 @@
"scripts" : {
"post-root-package-install" : "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"post-create-project-cmd" : [
"@php artisan key:generate",
"@php artisan self-diagnosis"
"@php artisan key:generate"
],
"post-autoload-dump" : [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
'Cart' => AvoRed\Framework\Cart\Facade::class,
'DataGrid' => AvoRed\Framework\DataGrid\Facade::class,
'Image' => AvoRed\Framework\Image\Facades\Image::class,
'Menu' => AvoRed\Framework\Menu\Facade::class,
'Menu' => AvoRed\Framework\Menu\Facades\Menu::class,
'Payment' => AvoRed\Framework\Payment\Facade::class,
'Permission' => AvoRed\Framework\Permission\Facade::class,
'Shipping' => AvoRed\Framework\Shipping\Facade::class,
Expand Down
95 changes: 0 additions & 95 deletions config/self-diagnosis.php

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\Http\Controllers\Controller;
use AvoRed\Banner\Models\Database\Banner;
use AvoRed\Banner\Http\Requests\BannerRequest;
use AvoRed\Framework\Image\Facade as Image;
use AvoRed\Framework\Image\Facades\Image;
use AvoRed\Banner\Models\Contracts\BannerInterface;

class BannerController extends Controller
Expand Down Expand Up @@ -80,7 +80,7 @@ private function _uploadBanner($image)
{
$tmpPath = str_split(strtolower(str_random(3)));
$checkDirectory = '/uploads/cms/images/' . implode('/', $tmpPath);
$localImage = Image::upload($image, $checkDirectory);
$localImage = Image::upload($image, $checkDirectory)->makeSizes()->get();

$symblink = config('avored-framework.symlink_storage_folder'). "/";

Expand Down
File renamed without changes.
File renamed without changes.
13 changes: 5 additions & 8 deletions modules/avored/contact/src/Module.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace AvoRed\Contact;

use Illuminate\Support\ServiceProvider;
use AvoRed\Framework\Menu\Menu;
use AvoRed\Framework\Menu\Facade as MenuFacade;
use AvoRed\Framework\Menu\Facades\Menu as MenuFacade;

class Module extends ServiceProvider
{

/**
* Bootstrap any application services.
*
Expand All @@ -18,7 +18,6 @@ public function boot()
$this->registerResources();
$this->registerFrontMenu();
$this->publishFiles();

}

/**
Expand All @@ -28,7 +27,6 @@ public function boot()
*/
public function register()
{

}

/**
Expand All @@ -53,7 +51,7 @@ public function publishFiles()
{
$this->publishes([
__DIR__ . '/../resources/views' => base_path('themes/avored/default/views/vendor')
],'avored-module-views');
], 'avored-module-views');
}

/**
Expand All @@ -63,10 +61,9 @@ public function publishFiles()
*/
protected function registerFrontMenu()
{
MenuFacade::make('contact-us',function (Menu $accountMenu){
MenuFacade::make('contact-us', function (Menu $accountMenu) {
$accountMenu->label('Contact Us')
->route('contact.index');
});

}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions modules/avored/dummy-data/database/seeds/AvoRedDataSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
use AvoRed\Framework\Models\Database\ProductImage;
use AvoRed\Framework\Models\Database\Page;
use AvoRed\Framework\Models\Database\Menu;
use AvoRed\Framework\Models\Database\MenuGroup;
use AvoRed\Framework\Models\Database\Configuration;
use AvoRed\Banner\Models\Database\Banner;
use AvoRed\Framework\Models\Database\ProductPropertyIntegerValue;
use AvoRed\Framework\Models\Database\Property;
use AvoRed\Framework\Models\Database\PropertyDropdownOption;


class AvoRedDataSeeder extends Seeder
{
/**
Expand Down Expand Up @@ -328,31 +331,43 @@ public function run()
ProductImage::create(['path' => 'uploads/catalog/images/0/y/4/tsf02crsa.jpg',
'product_id' => $vintageToast->id,
'is_main_image' => 1]);

$menuGroup = MenuGroup::create([
'name' => 'Main Menu',
'identifier' => 'main-menu'
]);

Menu::create([
'name' => $kitchenCategory->name,
'menu_group_id' => $menuGroup->id,
'params' => $kitchenCategory->slug,
'route' => 'category.view',
]);
Menu::create([
'name' => $bedroomCategory->name,
'menu_group_id' => $menuGroup->id,
'params' => $bedroomCategory->slug,
'route' => 'category.view',
]);
Menu::create([
'name' => $livingRoomCategory->name,
'menu_group_id' => $menuGroup->id,
'params' => $livingRoomCategory->slug,
'route' => 'category.view',
]);
Menu::create([
'name' => 'My Account',
'menu_group_id' => $menuGroup->id,
'route' => 'my-account.home',
]);
Menu::create([
'name' => 'Cart',
'menu_group_id' => $menuGroup->id,
'route' => 'cart.view',
]);
Menu::create([
'name' => 'Checkout',
'menu_group_id' => $menuGroup->id,
'route' => 'checkout.index',
]);
$homePageContent = html_entity_decode('<p>### avored-banner ###</p><p><strong>HOME PAGE FOR AvoRed E COMMERCE LARAVEL OPEN SOURCE SHOPPING CART</strong></p><p>&nbsp;</p><p><strong>Please star us on&nbsp;<a href="https://github.com/avored/laravel-ecommerce">https://github.com/avored/laravel-ecommerce</a></strong></p><p><strong>Like us on Facebook :&nbsp;<a href="https://www.facebook.com/avored/">https://www.facebook.com/avored/</a></strong></p><p><strong>Follow us on Twitter:&nbsp;<a href="https://twitter.com/avoredecommerce/">https://twitter.com/avoredecommerce/</a></strong></p><p></p><p>### avored-featured ###</p>');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,41 @@

use AvoRed\Promotion\DataGrid\PromotionDataGrid;
use AvoRed\Promotion\Http\Requests\PromotionRequest;
use Illuminate\Http\Request;
use AvoRed\Promotion\Models\Database\Promotion;
use AvoRed\Framework\System\Controllers\Controller;

class PromotionController extends Controller
{
public function index() {

/**
* Display all Promotion datagrid
*
* @return \Illuminate\View\View $response
*/
public function index()
{
$dataGrid = new PromotionDataGrid(Promotion::query());
return view('avored-promotion::promotion.index')->with('dataGrid', $dataGrid->dataGrid);
}

public function create() {

/**
* Create a promotion for store product or cart
*
* @return \Illuminate\View\View $response
*/
public function create()
{
return view('avored-promotion::promotion.create');
}

public function store(PromotionRequest $request) {

PromotionModel::create($request->all());
/**
* Store promotion into a database and redirect back to list all page
*
* @return \Illuminate\Http\RedirectResponse $redirect
*/
public function store(PromotionRequest $request)
{
Promotion::create($request->all());

return redirect()->route('admin.promotion.index');
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"postinstall": "opencollective postinstall"
},
"devDependencies": {
"@fortawesome/fontawesome-free-webfonts": "^1.0.6",
"axios": "^0.18",
"ajv": "^6.0.0",
"ajv-keywords": "^3.1",
Expand All @@ -41,7 +40,6 @@
"popper.js": "^1.14.3",
"select2": "^4.0.6-rc.1",
"skycons": "^1.0.0",
"summernote": "^0.8.10",
"vue": "^2.5.7"
},
"dependencies": {
Expand Down
Loading

0 comments on commit ad03166

Please sign in to comment.