Skip to content

Commit

Permalink
Merge pull request #55 from avored/dev
Browse files Browse the repository at this point in the history
merging dev to master
  • Loading branch information
indpurvesh authored Nov 27, 2018
2 parents 7050f19 + 8a0d645 commit 668a98b
Show file tree
Hide file tree
Showing 206 changed files with 1,769 additions and 3,702 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"mockery/mockery" : "1.2.*"
},
"autoload" : {
"classmap": [
"database/factories"
],
"psr-4" : {
"AvoRed\\Framework\\" : "src/"

Expand Down
11 changes: 11 additions & 0 deletions database/factories/CategoryFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use Faker\Generator as Faker;

$factory->define(AvoRed\Framework\Models\Database\Category::class, function (Faker $faker) {
$name = $faker->text(5);
return [
'name' => $name,
'slug' => str_slug($name),
];
});
14 changes: 14 additions & 0 deletions database/factories/CountryFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

use Faker\Generator as Faker;

$factory->define(AvoRed\Framework\Models\Database\Country::class, function (Faker $faker) {
return [
'name' => 'new zealand',
'code' => 'nzd',
'phone_code' => '0064',
'currency_code' => 'NZD',
'currency_symbol' => '$',
'lang_code' => 'English'
];
});
10 changes: 10 additions & 0 deletions database/factories/RoleFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

use Faker\Generator as Faker;

$factory->define(AvoRed\Framework\Models\Database\Role::class, function (Faker $faker) {
return [
'name' => $faker->text(rand(5,10)),
'description' => $faker->text(rand(50,60))
];
});
13 changes: 13 additions & 0 deletions database/factories/SiteCurrencyFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

use Faker\Generator as Faker;

$factory->define(AvoRed\Framework\Models\Database\SiteCurrency::class, function (Faker $faker) {
return [
'name' => 'currency name',
'code' => $faker->currencyCode,
'symbol' => '$',
'conversion_rate' => 1.00,
'status' => 'ENABLED'
];
});
13 changes: 13 additions & 0 deletions database/factories/StateFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

use Faker\Generator as Faker;
use AvoRed\Framework\Models\Database\Country;

$factory->define(AvoRed\Framework\Models\Database\State::class, function (Faker $faker) {
$country = factory(Country::class)->create();
return [
'name' => 'new zealand',
'code' => 'state for new zealand',
'country_id' => $country->id
];
});
15 changes: 15 additions & 0 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use Faker\Generator as Faker;

$factory->define(AvoRed\Framework\Models\Database\User::class, function (Faker $faker) {
return [
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
'email' => $faker->email,
'password' => bcrypt($faker->phoneNumber),
'phone' => $faker->phoneNumber,
'status' => 'LIVE'

];
});
10 changes: 10 additions & 0 deletions database/factories/UserGroupFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

use Faker\Generator as Faker;

$factory->define(AvoRed\Framework\Models\Database\UserGroup::class, function (Faker $faker) {
return [
'name' =>$faker->text(rand(5,10)),
'is_default' => rand(0,1)
];
});
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public function up()
$table->integer('qty');
$table->decimal('price', 11, 6);
$table->decimal('tax_amount', 11, 6);
$table->json('product_info')->nullable()->default(null);
$table->timestamps();

$table->foreign('order_id')->references('id')->on('orders');
Expand Down Expand Up @@ -592,6 +593,7 @@ public function up()
$table->increments('id');
$table->string('name')->nullable()->default(null);
$table->string('identifier')->nullable()->default(null);
$table->tinyInteger('is_default')->nullable()->default(0);
$table->timestamps();
});

Expand Down
64 changes: 64 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0"?>
<ruleset name="AvoRed Coding Standards">

<!--
The name attribute of the ruleset tag is displayed
when running PHP_CodeSniffer with the -v command line
argument. The description tag below is not displayed anywhere
except in this file, so it can contain information for
developers who may change this file in the future.
-->
<description>The AvoRed Coding Standards</description>

<!--
If no files or directories are specified on the command line
your custom standard can specify what files should be checked
instead.
Note that specifying any file or directory path
on the command line will ignore all file tags.
-->
<file>src/Permission</file>

<!--
You can hard-code ignore patterns directly into your
custom standard so you don't have to specify the
patterns on the command line.
-->
<exclude-pattern>*/config/*</exclude-pattern>
<exclude-pattern>*/database/*</exclude-pattern>
<exclude-pattern>*/resources/*</exclude-pattern>
<exclude-pattern>*/routes/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>

<!--
You can hard-code command line values into your custom standard.
Note that this does not work for the command line values:
-v[v][v], -l, -d, -sniffs and -standard
The following tags are equivalent to the command line arguments:
-p
-->
<arg name="colors"/>

<!--
You can hard-code custom php.ini settings into your custom standard.
The following tag sets the memory limit to 64M.
-->
<ini name="memory_limit" value="128M"/>

<!--
Include all sniffs in the PEAR standard. Note that the
path to the standard does not have to be specified as the
PEAR standard exists inside the PHP_CodeSniffer install
directory.
-->
<rule ref="PEAR">
<exclude name="PEAR.Commenting.FileComment" />
<exclude name="PEAR.Commenting.ClassComment" />
<exclude name="PEAR.Commenting.FunctionComment" />
</rule>

<rule ref="PEAR">
<exclude name="Generic.Commenting.DocComment" />
</rule>

</ruleset>
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</filter>

<!--logging>
<log type="coverage-html" target="../../public/cov/framework"
<log type="coverage-html" target="../../../public/cov/framework"
lowUpperBound="50" highLowerBound="80"/>
</logging-->
</phpunit>
</phpunit>
16 changes: 0 additions & 16 deletions resources/assets/images/logo.svg

This file was deleted.

8 changes: 0 additions & 8 deletions resources/assets/js/chat/index.js

This file was deleted.

23 changes: 0 additions & 23 deletions resources/assets/js/components/ExampleComponent.vue

This file was deleted.

Loading

0 comments on commit 668a98b

Please sign in to comment.