Skip to content

Commit b529671

Browse files
authored
Merge pull request #73 from avored/dev
Dev
2 parents 7bf823d + 1bf9517 commit b529671

File tree

311 files changed

+19399
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+19399
-0
lines changed

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
.idea/workspace.xml
3+
.idea/framework.iml
4+
.idea/modules.xml
5+
.idea/php.xml
6+
.idea/vcs.xml
7+
src/.DS_Store
8+
src/.DS_Store
9+
.DS_Store
10+
.DS_Store
11+
.DS_Store
12+
.DS_Store
13+
.DS_Store
14+
.DS_Store

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
cache:
3+
directories:
4+
- "$HOME/.composer/cache"
5+
php:
6+
- '7.2'
7+
script:
8+
- vendor/bin/phpunit -c phpunit.xml
9+
10+
install: composer install --no-interaction

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AvoRed E commerce Framework
2+
AvoRed Framework contains the core features for the AvoRed E commerce for Laravel. It is the base behind the AvoRed an Laravel Ecommerce.
3+
4+
#### Installation
5+
AvoRed E commerce framework provided as a composer package so it make installation of the avored is much easier as
6+
7+
composer require avored/framework:dev-restart
8+
9+
At these stage we been using latest laravel framework which is 5.8 if you are using some older version let us know at our [Discussion Forum](https://www.avored.com/discussion). We will do a test and if it works then add support for that version too.
10+
11+
Once these finished then you have to run few command to finished up and then you are ready to roll.
12+
13+
#### Publish the Files
14+
Publish the AvoRed E commerce framework config
15+
file and assets(JS/CSS and Images).
16+
17+
php artisan vendor:publish --provider=AvoRed\Framework\AvoRedServiceProvider
18+
19+
20+
Once the all the file is publish then we run below command to install the required database tables.
21+
22+
php artisan avored:install
23+
24+
We almost there and now create your Administrator Account by running
25+
26+
php artisan avored:admin:make
27+
28+
29+
That's It.
30+
31+
Now Visit
32+
33+
yoursiteurl.com/admin

assets/avored-admin/css/app.css

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading

assets/avored-admin/images/logo.svg

+16
Loading

assets/avored-admin/js/app.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/countries.json

+1
Large diffs are not rendered by default.

composer.json

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name" : "avored/framework",
3+
"description" : "AvoRed Laravel E commerce Framework",
4+
"keywords" : [
5+
"framework",
6+
"cart",
7+
"laravel",
8+
"e commerce",
9+
"laravel5",
10+
"shop",
11+
"shopping-cart",
12+
"e-commerce",
13+
"shopping cart",
14+
"e commerce"
15+
],
16+
"license" : "MIT",
17+
"authors" : [{
18+
"name" : "Purvesh ",
19+
"email" : "[email protected]"
20+
}
21+
],
22+
"type" : "library",
23+
"require" : {
24+
"php" : ">=7.1.3",
25+
"symfony/yaml": "^4.2",
26+
"laravel/framework" : "5.8.*",
27+
"barryvdh/laravel-dompdf": "0.8.*",
28+
"laravel/passport": "^7.2",
29+
"stripe/stripe-php": "^6.3",
30+
"rebing/graphql-laravel": "^1.20"
31+
},
32+
"require-dev" : {
33+
"phpunit/phpunit" : "~8.1",
34+
"orchestra/testbench" : "~3.7",
35+
"mockery/mockery" : "1.2.*"
36+
},
37+
"autoload" : {
38+
"classmap": [
39+
"database/factories"
40+
],
41+
"psr-4" : {
42+
"AvoRed\\Framework\\" : "src/"
43+
44+
}
45+
},
46+
"autoload-dev" : {
47+
"psr-4" : {
48+
"AvoRed\\Framework\\Tests\\" : "tests/"
49+
}
50+
},
51+
"extra" : {
52+
"laravel" : {
53+
"providers" : [
54+
"AvoRed\\Framework\\AvoRedProvider"
55+
],
56+
"aliases" : {
57+
"Breadcrumb" : "AvoRed\\Framework\\Support\\Facades\\Breadcrumb",
58+
"Menu" : "AvoRed\\Framework\\Support\\Facades\\Menu",
59+
"Module" : "AvoRed\\Framework\\Support\\Facades\\Module",
60+
"Permission" : "AvoRed\\Framework\\Support\\Facades\\Permission"
61+
}
62+
}
63+
},
64+
"homepage" : "https://www.avored.com",
65+
"support" : {
66+
"email" : "[email protected]",
67+
"issues" : "https://www.avored.com/discussion",
68+
"forum" : "https://www.avored.com/discussion",
69+
"wiki" : "https://www.avored.com/docs",
70+
"source" : "https://www.github.com/avored/framework"
71+
}
72+
}

config/avored.php

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?php
2+
/*
3+
|--------------------------------------------------------------------------
4+
| AvoRed Cart Products Session Identifier
5+
|--------------------------------------------------------------------------
6+
*/
7+
return [
8+
'admin_url' => 'admin',
9+
'symlink_storage_folder' => 'storage',
10+
'cart' => ['session_key' => 'cart_products'],
11+
'model' => [
12+
'user' => App\User::class
13+
],
14+
15+
'filesystems' => [
16+
'disks' => [
17+
'avored' => [
18+
'driver' => 'local',
19+
'root' => storage_path('app/public'),
20+
],
21+
],
22+
],
23+
'image' => [
24+
'driver' => 'gd',
25+
'sizes' => [
26+
'small' => ['150', '150'],
27+
'med' => ['350', '350'],
28+
'large' => ['750', '750'],
29+
],
30+
],
31+
'auth' => [
32+
'guards' => [
33+
'admin' => [
34+
'driver' => 'session',
35+
'provider' => 'admin-users',
36+
],
37+
'admin_api' => [
38+
'driver' => 'passport',
39+
'provider' => 'admin-users',
40+
'hash' => false,
41+
],
42+
],
43+
44+
'providers' => [
45+
'admin-users' => [
46+
'driver' => 'eloquent',
47+
'model' => AvoRed\Framework\Database\Models\AdminUser::class,
48+
],
49+
],
50+
51+
'passwords' => [
52+
'adminusers' => [
53+
'provider' => 'admin-users',
54+
'table' => 'admin_password_resets',
55+
'expire' => 60,
56+
],
57+
],
58+
],
59+
'graphql' => [
60+
'schemas' => [
61+
'default' => [
62+
'query' => [
63+
// 'example_query' => ExampleQuery::class,
64+
'userInfo' => AvoRed\Framework\GraphQL\Query\System\Auth\UserInfoQuery::class,
65+
'admin_menus' => AvoRed\Framework\GraphQL\Query\System\Layout\AdminMenuQuery::class,
66+
'allCategory' => AvoRed\Framework\GraphQL\Query\Catalog\Category\AllQuery::class,
67+
'fetchCategory' => AvoRed\Framework\GraphQL\Query\Catalog\Category\FetchQuery::class,
68+
],
69+
'mutation' => [
70+
'createCategory' => AvoRed\Framework\GraphQL\Mutation\Catalog\Category\Create::class,
71+
'updateCategory' => AvoRed\Framework\GraphQL\Mutation\Catalog\Category\Update::class,
72+
'deleteCategory' => AvoRed\Framework\GraphQL\Mutation\Catalog\Category\Delete::class,
73+
],
74+
'middleware' => ['auth:admin_api'],
75+
'method' => ['get', 'post'],
76+
],
77+
'guest' => [
78+
'query' => [
79+
// 'example_query' => ExampleQuery::class,
80+
],
81+
'mutation' => [
82+
'auth' => AvoRed\Framework\GraphQL\Mutation\Auth\Login::class
83+
],
84+
'middleware' => [],
85+
'method' => ['get', 'post'],
86+
],
87+
],
88+
'types' => [
89+
'token' => \AvoRed\Framework\GraphQL\Type\Auth\TokenType::class,
90+
'adminUserType' => \AvoRed\Framework\GraphQL\Type\System\AdminUserType::class,
91+
'adminMenuType' => \AvoRed\Framework\GraphQL\Type\System\Layout\AdminMenuType::class,
92+
'category_type' => \AvoRed\Framework\GraphQL\Type\Catalog\CategoryType::class,
93+
],
94+
],
95+
];
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
use Faker\Generator as Faker;
4+
use AvoRed\Framework\Database\Models\Role;
5+
use AvoRed\Framework\Database\Models\AdminUser;
6+
7+
$factory->define(AdminUser::class, function (Faker $faker) {
8+
9+
$role = factory(Role::class)->create();
10+
return [
11+
'first_name' => $faker->firstName,
12+
'last_name' => $faker->lastName,
13+
'email' => $faker->email,
14+
'password' => 'secret',
15+
'role_id' => $role->id,
16+
'is_super_admin' => rand(0, 1),
17+
'image_path' => null
18+
];
19+
});
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
use Faker\Generator as Faker;
3+
use AvoRed\Framework\Database\Models\Attribute;
4+
use Illuminate\Support\Str;
5+
6+
$factory->define(Attribute::class, function (Faker $faker) {
7+
$name = $faker->sentence;
8+
9+
return [
10+
'name' => $name,
11+
'slug' => Str::slug($name),
12+
];
13+
});
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
use Faker\Generator as Faker;
3+
use AvoRed\Framework\Database\Models\Category;
4+
5+
$factory->define(Category::class, function (Faker $faker) {
6+
$name = $faker->word;
7+
return [
8+
'name' => $name,
9+
'slug' => Str::slug($name),
10+
'meta_title' => $faker->sentence,
11+
'meta_description' => $faker->sentence,
12+
];
13+
});

database/factories/CountryFactory.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
use Faker\Generator as Faker;
3+
use AvoRed\Framework\Database\Models\Country;
4+
5+
$factory->define(Country::class, function (Faker $faker) {
6+
return [
7+
'name' => $faker->country,
8+
'code' => $faker->countryCode,
9+
'phone_code' => $faker->currencyCode,
10+
'currency_code' => $faker->currencyCode,
11+
'currency_symbol' => '$',
12+
'lang_code' => $faker->languageCode,
13+
];
14+
});
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
use Faker\Generator as Faker;
3+
use AvoRed\Framework\Database\Models\Currency;
4+
5+
$factory->define(Currency::class, function (Faker $faker) {
6+
return [
7+
'name' => 'US Dollar',
8+
'code' => $faker->currencyCode,
9+
'symbol' => '$',
10+
'conversation_rate' => $faker->randomFloat,
11+
'status' => 'ENABLED'
12+
];
13+
});
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
use Faker\Generator as Faker;
3+
use AvoRed\Framework\Database\Models\Language;
4+
5+
$factory->define(Language::class, function (Faker $faker) {
6+
return [
7+
'name' => $faker->word,
8+
'code' => $faker->languageCode
9+
];
10+
});
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
use Faker\Generator as Faker;
3+
use AvoRed\Framework\Database\Models\OrderStatus;
4+
5+
$factory->define(OrderStatus::class, function (Faker $faker) {
6+
return [
7+
'name' => $faker->sentence,
8+
'is_default' => rand(0, 1)
9+
];
10+
});

0 commit comments

Comments
 (0)