Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
purveshpatelau committed Jun 10, 2020
1 parent 665873a commit 77a5d20
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/avored-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ['7.2', '7.3', '7.4']
# php: ['7.2', '7.3', '7.4']
php: ['7.2']
laravel: ['5.8.*']
include:
- laravel: '5.8.*'
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
"laravel/passport": "^7.4|^8.0|^9.0",
"barryvdh/laravel-dompdf": "^0.8.4",
"laravel/helpers": "^1.1",
"laravel/framework" : "^5.8.15|^6.0|^7.0"
"laravel/framework" : "^5.8.15|^6.0|^7.0",
"rebing/graphql-laravel": "^5.1"
},
"require-dev" : {
"phpunit/phpunit": "^8.0|^9.0",
"orchestra/testbench": "^3.8|^4.0|^5.0"
"orchestra/testbench": "^3.8|^4.0|^5.0",
"phpstan/phpstan": "^0.12.27"
},
"autoload" : {
"classmap": [
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Product extends BaseModel

const PRODUCT_TYPES_BASIC = 'BASIC';
const PRODUCT_TYPES_DOWNLOADABLE = 'DOWNLOADABLE';
const PRODUCT_TYPES_VARIABLE_PRODUCT = 'DOWNLOADABLE';
const PRODUCT_TYPES_VARIABLE_PRODUCT = 'VARIABLE_PRODUCT';

/**
* Belongs to Many Categories.
Expand Down
10 changes: 10 additions & 0 deletions src/Menu/MenuItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ class MenuItem implements MenuInterface
*/
public $routeName;

/**
* @var calllback
*/
public $callback;

/**
* @var array $subMenu
*/
public $subMenu;

/**
* AvoRed Front Menu Construct method.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Console/ControllerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Console\Command;
use Illuminate\Support\Facades\App;
use Illuminate\Filesystem\Filesystem;
use AvoRed\Framework\Modules\Facade as Module;
use AvoRed\Framework\Support\Facades\Module;
use Symfony\Component\Console\Input\InputArgument;

class ControllerMakeCommand extends Command
Expand Down
8 changes: 8 additions & 0 deletions src/Modules/Console/ModuleInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ class ModuleInstallCommand extends Command
*/
protected $description = 'Install a module';


/**
* The migrator instance.
*
* @var \Illuminate\Database\Migrations\Migrator
*/
protected $migrator;

/**
* Create a new migration command instance.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function getByPath($path)
public function publishItem($from, $to)
{
if ($this->files->isDirectory($from)) {
return $this->publishDirectory($from, $to);
$this->publishDirectory($from, $to);
}

throw new \Exception("Can't locate path: <{$from}>");
Expand Down
6 changes: 3 additions & 3 deletions src/Support/Facades/Breadcrumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Breadcrumb\Builer make($name, callable $callable)
* @method \AvoRed\Framework\Breadcrumb\Builer render($routeName)
* @method \AvoRed\Framework\Breadcrumb\Builer get($key)
* @method \AvoRed\Framework\Breadcrumb\Builer static make($name, callable $callable)
* @method \AvoRed\Framework\Breadcrumb\Builer static render($routeName)
* @method \AvoRed\Framework\Breadcrumb\Builer static get($key)
*/
class Breadcrumb extends Facade
{
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Facades/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Cart Manager.
* @method static \AvoRed\Framework\Cart\Manager add($slug)
* @method static \AvoRed\Framework\Cart\Manager static add($slug)
*/
class Cart extends Facade
{
Expand Down
6 changes: 3 additions & 3 deletions src/Support/Facades/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Menu\Builer make($key, callable $callable)
* @method \AvoRed\Framework\Menu\Builer get($key)
* @method \AvoRed\Framework\Menu\Builer all()
* @method \AvoRed\Framework\Menu\Builer static make($key, callable $callable)
* @method \AvoRed\Framework\Menu\Builer static get($key)
* @method \AvoRed\Framework\Menu\Builer static all()
*/
class Menu extends Facade
{
Expand Down
12 changes: 6 additions & 6 deletions src/Support/Facades/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Modules\Manager all()
* @method \AvoRed\Framework\Modules\Manager loadModules()
* @method \AvoRed\Framework\Modules\Manager put($identifier, $moduleInfo)
* @method \AvoRed\Framework\Modules\Manager get($identifier)
* @method \AvoRed\Framework\Modules\Manager getByPath($path)
* @method \AvoRed\Framework\Modules\Manager publishItem($from, $to)
* @method \AvoRed\Framework\Modules\Manager static all()
* @method \AvoRed\Framework\Modules\Manager static loadModules()
* @method \AvoRed\Framework\Modules\Manager static put($identifier, $moduleInfo)
* @method \AvoRed\Framework\Modules\Manager static get($identifier)
* @method \AvoRed\Framework\Modules\Manager static getByPath($path)
* @method \AvoRed\Framework\Modules\Manager static publishItem($from, $to)
*/
class Module extends Facade
{
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Facades/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Payment\all all()
* @method \AvoRed\Framework\Payment\all static all()
*/
class Payment extends Facade
{
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Facades/Shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Shipping\all all()
* @method \AvoRed\Framework\Shipping\all static all()
*/
class Shipping extends Facade
{
Expand Down
6 changes: 3 additions & 3 deletions src/Support/Facades/Tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Tab\Manager all()
* @method \AvoRed\Framework\Tab\Manager put($key, $tab)
* @method static \AvoRed\Framework\Tab\Manager get($key)
* @method \AvoRed\Framework\Tab\Manager static all()
* @method \AvoRed\Framework\Tab\Manager static put($key, $tab)
* @method static \AvoRed\Framework\Tab\Manager static get($key)
*/
class Tab extends Facade
{
Expand Down
8 changes: 4 additions & 4 deletions src/Support/Facades/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use Illuminate\Support\Facades\Facade;

/**
* @method \AvoRed\Framework\Widget\WidgetManager make($name, $widget)
* @method \AvoRed\Framework\Widget\WidgetManager get($key)
* @method \AvoRed\Framework\Widget\WidgetManager all()
* @method \AvoRed\Framework\Widget\WidgetManager options()
* @method \AvoRed\Framework\Widget\WidgetManager static make($name, $widget)
* @method static \AvoRed\Framework\Widget\WidgetManager static get($key)
* @method \AvoRed\Framework\Widget\WidgetManager static all()
* @method \AvoRed\Framework\Widget\WidgetManager static options()
*/
class Widget extends Facade
{
Expand Down
6 changes: 3 additions & 3 deletions src/Support/Providers/GraphqlProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ protected function registerRebingGraphqlProvider(): void
protected function registerMiddleware()
{
$router = $this->app['router'];
$router->aliasMiddleware('admin.auth', AdminAuth::class);
$router->aliasMiddleware('admin.guest', RedirectIfAdminAuth::class);
$router->aliasMiddleware('avored', AvoRedCore::class);
// $router->aliasMiddleware('admin.auth', AdminAuth::class);
// $router->aliasMiddleware('admin.guest', RedirectIfAdminAuth::class);
// $router->aliasMiddleware('avored', AvoRedCore::class);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/System/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class DashboardController
public function index()
{
$orderWidget = Widget::get('avored-total-order');
dd($orderWidget);
$customerWidget = Widget::get('avored-total-customer');
$revenueWidget = Widget::get('avored-total-revenue');

Expand Down
2 changes: 1 addition & 1 deletion src/Widget/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Widget implements WidgetInterface
*/
public function __construct($callable)
{
$this->callback = $callable;
$this->callable = $callable;
$callable($this);
}

Expand Down

0 comments on commit 77a5d20

Please sign in to comment.