diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index c610769..c81b807 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -28,7 +28,7 @@ class RegisterController extends Controller * * @var string */ - protected $redirectTo = '/home'; + protected $redirectTo = '/'; /** * Create a new controller instance. @@ -49,7 +49,7 @@ public function __construct() protected function validator(array $data) { return Validator::make($data, [ - 'name' => 'required|max:255', + 'username' => 'required|max:255', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|min:6|confirmed', ]); @@ -68,7 +68,7 @@ protected function create(array $data) * Create new user */ $user = new User(); - $user->name = $data['name']; + $user->username = $data['username']; $user->email = $data['email']; $user->password = bcrypt($data['password']); $user->save(); diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 95f20a4..deb5059 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -44,7 +44,7 @@ 'subcategory_id' => rand(1, 7), 'name' => $faker->unique()->word, 'description' => $faker->text(800), - 'price' => $faker->randomFloat(2, 150, 900), + 'price' => $faker->randomFloat(2, 340, 8000), 'quantity' => rand(0, 15) ]; }); diff --git a/database/seeds/ProductsTableSeeder.php b/database/seeds/ProductsTableSeeder.php index a46bc4e..a83e371 100644 --- a/database/seeds/ProductsTableSeeder.php +++ b/database/seeds/ProductsTableSeeder.php @@ -16,63 +16,44 @@ public function run() $productsToSwords = [ 'FINE AND RARE BOLIVIAN OFFICER’S SWORD', - 'miecz jednoręczny - dekoracyjny2', 'miecz jednoręczny - dekoracyjny3', - 'miecz jednoręczny - dekoracyjny4', 'miecz jednoręczny - dekoracyjny5', 'miecz jednoręczny - dekoracyjny6', 'miecz jednoręczny - szczerbiec' + 'US M.1852 NAVAL OFFICER’S SWORD', + 'ITALIAN 1888 MODEL CAVALRY OFFICER’S SWORD', + 'OTTOMAN SHAMSHIR', + 'BRITISH DIPLOMAT’S SWORD', + 'KNIGHTS TEMPLAR SWORD', + 'FRENCH INFANTRY SWORD', + 'US MILITARY ACADEMY CADET SWORD', + 'INDOPERSIAN HORSEMAN\'S SWORD C.1750' ]; - $productsToAxes = ['axe']; - $productsToShields = ['legion shield']; - $productsToHelmets = ['helmet']; + $productsToDaggers = []; + + $productsToShields = []; + + $productsToHelmets = []; + + $productsToArmors = []; $swordsThumbnails = [ '/images/thumbnails/swords/1.jpg', '/images/thumbnails/swords/2.jpg', '/images/thumbnails/swords/3.jpg', - '/images/thumbnails/swords/4.jpg', '/images/thumbnails/swords/5.jpg', '/images/thumbnails/swords/6.jpg', '/images/thumbnails/swords/7.jpg' + '/images/thumbnails/swords/4.jpg', '/images/thumbnails/swords/5.jpg', '/images/thumbnails/swords/6.jpg', + '/images/thumbnails/swords/7.jpg', '/images/thumbnails/swords/8.jpg', '/images/thumbnails/swords/9.jpg', ]; - $axesThumbnails = ['/images/thumbnails/axes/axe.jpg']; - $shieldsThumbnails = ['/images/thumbnails/shields/legion_shield.jpg']; - $helmetsThumbnails = ['/images/thumbnails/helmets/helmet.jpg']; - $subcategories = Subcategory::all(); $subcategorySwords = $subcategories->where('name', 'swords')->first(); - $subcategoryAxes = $subcategories->where('name', 'axes')->first(); + $subcategoryDaggers = $subcategories->where('name', 'daggers')->first(); $subcategoryShields = $subcategories->where('name', 'shields')->first(); $subcategoryHelmets = $subcategories->where('name', 'helmets')->first(); + $subcategoryArmors = $subcategories->where('name', 'armors')->first(); for ($i = 0; $i < count($productsToSwords); $i++) { factory(Product::class)->create([ 'subcategory_id' => $subcategorySwords->id, 'name' => $productsToSwords[$i], 'path_to_thumbnail' => $swordsThumbnails[$i], - 'quantity' => 5 - ]); - } - - for ($i = 0; $i < count($productsToAxes); $i++) { - factory(Product::class)->create([ - 'subcategory_id' => $subcategoryAxes->id, - 'name' => $productsToAxes[$i], - 'path_to_thumbnail' => $axesThumbnails[$i], - 'quantity' => 8 - ]); - } - - for ($i = 0; $i < count($productsToShields); $i++) { - factory(Product::class)->create([ - 'subcategory_id' => $subcategoryShields->id, - 'name' => $productsToShields[$i], - 'path_to_thumbnail' => $shieldsThumbnails[$i], - 'quantity' => 14 - ]); - } - - for ($i = 0; $i < count($productsToHelmets); $i++) { - factory(Product::class)->create([ - 'subcategory_id' => $subcategoryHelmets->id, - 'name' => $productsToHelmets[$i], - 'path_to_thumbnail' => $helmetsThumbnails[$i], - 'quantity' => 3 + 'quantity' => 9 ]); } @@ -81,13 +62,6 @@ public function run() // factory(Product::class, 120)->create([ // 'subcategory_id' => $subcategory->id // ]); -// } - -// foreach ($subcategories as $subcategory) { -// factory(Product::class, 2)->create([ -// 'subcategory_id' => $subcategory->id, -// 'recommended' => true -// ]); // } } } diff --git a/database/seeds/SubcategoriesTableSeeder.php b/database/seeds/SubcategoriesTableSeeder.php index 874b957..c6a00fc 100644 --- a/database/seeds/SubcategoriesTableSeeder.php +++ b/database/seeds/SubcategoriesTableSeeder.php @@ -13,8 +13,8 @@ class SubcategoriesTableSeeder extends Seeder */ public function run() { - $subcategoryNamesToAttack = ['swords', 'axes', 'katanas']; - $subcategoryNamesToDefend = ['armours', 'helmets', 'shields']; + $subcategoryNamesToAttack = ['swords', 'daggers']; + $subcategoryNamesToDefend = ['armors', 'helmets', 'shields']; $categories = Category::all(); diff --git a/public/images/galleries/swords/2/1.jpg b/public/images/galleries/swords/2/1.jpg new file mode 100644 index 0000000..78d60f8 Binary files /dev/null and b/public/images/galleries/swords/2/1.jpg differ diff --git a/public/images/galleries/swords/2/1_tb.jpg b/public/images/galleries/swords/2/1_tb.jpg new file mode 100644 index 0000000..448f10b Binary files /dev/null and b/public/images/galleries/swords/2/1_tb.jpg differ diff --git a/public/images/galleries/swords/2/2.jpg b/public/images/galleries/swords/2/2.jpg new file mode 100644 index 0000000..c555d28 Binary files /dev/null and b/public/images/galleries/swords/2/2.jpg differ diff --git a/public/images/galleries/swords/2/2_tb.jpg b/public/images/galleries/swords/2/2_tb.jpg new file mode 100644 index 0000000..560fc4b Binary files /dev/null and b/public/images/galleries/swords/2/2_tb.jpg differ diff --git a/public/images/galleries/swords/2/3.jpg b/public/images/galleries/swords/2/3.jpg new file mode 100644 index 0000000..5d401b3 Binary files /dev/null and b/public/images/galleries/swords/2/3.jpg differ diff --git a/public/images/galleries/swords/2/3_tb.jpg b/public/images/galleries/swords/2/3_tb.jpg new file mode 100644 index 0000000..e37ba9f Binary files /dev/null and b/public/images/galleries/swords/2/3_tb.jpg differ diff --git a/public/images/galleries/swords/3/1.jpg b/public/images/galleries/swords/3/1.jpg new file mode 100644 index 0000000..95f9cef Binary files /dev/null and b/public/images/galleries/swords/3/1.jpg differ diff --git a/public/images/galleries/swords/3/1_tb.jpg b/public/images/galleries/swords/3/1_tb.jpg new file mode 100644 index 0000000..35dd6f3 Binary files /dev/null and b/public/images/galleries/swords/3/1_tb.jpg differ diff --git a/public/images/galleries/swords/3/2.jpg b/public/images/galleries/swords/3/2.jpg new file mode 100644 index 0000000..c6ec99b Binary files /dev/null and b/public/images/galleries/swords/3/2.jpg differ diff --git a/public/images/galleries/swords/3/2_tb.jpg b/public/images/galleries/swords/3/2_tb.jpg new file mode 100644 index 0000000..efda458 Binary files /dev/null and b/public/images/galleries/swords/3/2_tb.jpg differ diff --git a/public/images/galleries/swords/3/3.jpg b/public/images/galleries/swords/3/3.jpg new file mode 100644 index 0000000..d7cefb8 Binary files /dev/null and b/public/images/galleries/swords/3/3.jpg differ diff --git a/public/images/galleries/swords/3/3_tb.jpg b/public/images/galleries/swords/3/3_tb.jpg new file mode 100644 index 0000000..d6d5bf3 Binary files /dev/null and b/public/images/galleries/swords/3/3_tb.jpg differ diff --git a/public/images/galleries/swords/4/1.jpg b/public/images/galleries/swords/4/1.jpg new file mode 100644 index 0000000..dbf8d61 Binary files /dev/null and b/public/images/galleries/swords/4/1.jpg differ diff --git a/public/images/galleries/swords/4/1_tb.jpg b/public/images/galleries/swords/4/1_tb.jpg new file mode 100644 index 0000000..f2218d7 Binary files /dev/null and b/public/images/galleries/swords/4/1_tb.jpg differ diff --git a/public/images/galleries/swords/4/2.jpg b/public/images/galleries/swords/4/2.jpg new file mode 100644 index 0000000..be89905 Binary files /dev/null and b/public/images/galleries/swords/4/2.jpg differ diff --git a/public/images/galleries/swords/4/2_tb.jpg b/public/images/galleries/swords/4/2_tb.jpg new file mode 100644 index 0000000..75a52a7 Binary files /dev/null and b/public/images/galleries/swords/4/2_tb.jpg differ diff --git a/public/images/galleries/swords/4/3.jpg b/public/images/galleries/swords/4/3.jpg new file mode 100644 index 0000000..d981aa4 Binary files /dev/null and b/public/images/galleries/swords/4/3.jpg differ diff --git a/public/images/galleries/swords/4/3_tb.jpg b/public/images/galleries/swords/4/3_tb.jpg new file mode 100644 index 0000000..72a7e2a Binary files /dev/null and b/public/images/galleries/swords/4/3_tb.jpg differ diff --git a/public/images/galleries/swords/5/1.jpg b/public/images/galleries/swords/5/1.jpg new file mode 100644 index 0000000..5fc3749 Binary files /dev/null and b/public/images/galleries/swords/5/1.jpg differ diff --git a/public/images/galleries/swords/5/1_tb.jpg b/public/images/galleries/swords/5/1_tb.jpg new file mode 100644 index 0000000..e3c3eed Binary files /dev/null and b/public/images/galleries/swords/5/1_tb.jpg differ diff --git a/public/images/galleries/swords/5/2.jpg b/public/images/galleries/swords/5/2.jpg new file mode 100644 index 0000000..b41a433 Binary files /dev/null and b/public/images/galleries/swords/5/2.jpg differ diff --git a/public/images/galleries/swords/5/2_tb.jpg b/public/images/galleries/swords/5/2_tb.jpg new file mode 100644 index 0000000..626c738 Binary files /dev/null and b/public/images/galleries/swords/5/2_tb.jpg differ diff --git a/public/images/galleries/swords/5/3.jpg b/public/images/galleries/swords/5/3.jpg new file mode 100644 index 0000000..fda6335 Binary files /dev/null and b/public/images/galleries/swords/5/3.jpg differ diff --git a/public/images/galleries/swords/5/3_tb.jpg b/public/images/galleries/swords/5/3_tb.jpg new file mode 100644 index 0000000..2587eef Binary files /dev/null and b/public/images/galleries/swords/5/3_tb.jpg differ diff --git a/public/images/galleries/swords/6/1.jpg b/public/images/galleries/swords/6/1.jpg new file mode 100644 index 0000000..5329d17 Binary files /dev/null and b/public/images/galleries/swords/6/1.jpg differ diff --git a/public/images/galleries/swords/6/1_tb.jpg b/public/images/galleries/swords/6/1_tb.jpg new file mode 100644 index 0000000..515b80a Binary files /dev/null and b/public/images/galleries/swords/6/1_tb.jpg differ diff --git a/public/images/galleries/swords/6/2.jpg b/public/images/galleries/swords/6/2.jpg new file mode 100644 index 0000000..9a20780 Binary files /dev/null and b/public/images/galleries/swords/6/2.jpg differ diff --git a/public/images/galleries/swords/6/2_tb.jpg b/public/images/galleries/swords/6/2_tb.jpg new file mode 100644 index 0000000..b4c3992 Binary files /dev/null and b/public/images/galleries/swords/6/2_tb.jpg differ diff --git a/public/images/galleries/swords/6/3.jpg b/public/images/galleries/swords/6/3.jpg new file mode 100644 index 0000000..a028230 Binary files /dev/null and b/public/images/galleries/swords/6/3.jpg differ diff --git a/public/images/galleries/swords/6/3_tb.jpg b/public/images/galleries/swords/6/3_tb.jpg new file mode 100644 index 0000000..bec9e60 Binary files /dev/null and b/public/images/galleries/swords/6/3_tb.jpg differ diff --git a/public/images/galleries/swords/7/1.jpg b/public/images/galleries/swords/7/1.jpg new file mode 100644 index 0000000..e2920f9 Binary files /dev/null and b/public/images/galleries/swords/7/1.jpg differ diff --git a/public/images/galleries/swords/7/1_tb.jpg b/public/images/galleries/swords/7/1_tb.jpg new file mode 100644 index 0000000..bc95c3d Binary files /dev/null and b/public/images/galleries/swords/7/1_tb.jpg differ diff --git a/public/images/galleries/swords/7/2.jpg b/public/images/galleries/swords/7/2.jpg new file mode 100644 index 0000000..a2a207b Binary files /dev/null and b/public/images/galleries/swords/7/2.jpg differ diff --git a/public/images/galleries/swords/7/2_tb.jpg b/public/images/galleries/swords/7/2_tb.jpg new file mode 100644 index 0000000..e47eacb Binary files /dev/null and b/public/images/galleries/swords/7/2_tb.jpg differ diff --git a/public/images/galleries/swords/7/3.jpg b/public/images/galleries/swords/7/3.jpg new file mode 100644 index 0000000..09de170 Binary files /dev/null and b/public/images/galleries/swords/7/3.jpg differ diff --git a/public/images/galleries/swords/7/3_tb.jpg b/public/images/galleries/swords/7/3_tb.jpg new file mode 100644 index 0000000..c43bb0f Binary files /dev/null and b/public/images/galleries/swords/7/3_tb.jpg differ diff --git a/public/images/galleries/swords/8/1.jpg b/public/images/galleries/swords/8/1.jpg new file mode 100644 index 0000000..aaf33cb Binary files /dev/null and b/public/images/galleries/swords/8/1.jpg differ diff --git a/public/images/galleries/swords/8/1_tb.jpg b/public/images/galleries/swords/8/1_tb.jpg new file mode 100644 index 0000000..333cefa Binary files /dev/null and b/public/images/galleries/swords/8/1_tb.jpg differ diff --git a/public/images/galleries/swords/8/2.jpg b/public/images/galleries/swords/8/2.jpg new file mode 100644 index 0000000..3131a7a Binary files /dev/null and b/public/images/galleries/swords/8/2.jpg differ diff --git a/public/images/galleries/swords/8/2_tb.jpg b/public/images/galleries/swords/8/2_tb.jpg new file mode 100644 index 0000000..ab669d2 Binary files /dev/null and b/public/images/galleries/swords/8/2_tb.jpg differ diff --git a/public/images/galleries/swords/8/3.jpg b/public/images/galleries/swords/8/3.jpg new file mode 100644 index 0000000..ccb6059 Binary files /dev/null and b/public/images/galleries/swords/8/3.jpg differ diff --git a/public/images/galleries/swords/8/3_tb.jpg b/public/images/galleries/swords/8/3_tb.jpg new file mode 100644 index 0000000..9eabf03 Binary files /dev/null and b/public/images/galleries/swords/8/3_tb.jpg differ diff --git a/public/images/galleries/swords/9/1.jpg b/public/images/galleries/swords/9/1.jpg new file mode 100644 index 0000000..f8a1b52 Binary files /dev/null and b/public/images/galleries/swords/9/1.jpg differ diff --git a/public/images/galleries/swords/9/1_tb.jpg b/public/images/galleries/swords/9/1_tb.jpg new file mode 100644 index 0000000..1b6d253 Binary files /dev/null and b/public/images/galleries/swords/9/1_tb.jpg differ diff --git a/public/images/galleries/swords/9/2.jpg b/public/images/galleries/swords/9/2.jpg new file mode 100644 index 0000000..f6c935e Binary files /dev/null and b/public/images/galleries/swords/9/2.jpg differ diff --git a/public/images/galleries/swords/9/2_tb.jpg b/public/images/galleries/swords/9/2_tb.jpg new file mode 100644 index 0000000..f4971a3 Binary files /dev/null and b/public/images/galleries/swords/9/2_tb.jpg differ diff --git a/public/images/galleries/swords/9/3.jpg b/public/images/galleries/swords/9/3.jpg new file mode 100644 index 0000000..bae21b5 Binary files /dev/null and b/public/images/galleries/swords/9/3.jpg differ diff --git a/public/images/galleries/swords/9/3_tb.jpg b/public/images/galleries/swords/9/3_tb.jpg new file mode 100644 index 0000000..46edf28 Binary files /dev/null and b/public/images/galleries/swords/9/3_tb.jpg differ diff --git a/public/images/thumbnails/axes/axe.jpg b/public/images/thumbnails/axes/axe.jpg deleted file mode 100644 index 828a941..0000000 Binary files a/public/images/thumbnails/axes/axe.jpg and /dev/null differ diff --git a/public/images/thumbnails/helmets/helmet.jpg b/public/images/thumbnails/helmets/helmet.jpg deleted file mode 100644 index 325cf8b..0000000 Binary files a/public/images/thumbnails/helmets/helmet.jpg and /dev/null differ diff --git a/public/images/thumbnails/shields/legion_shield.jpg b/public/images/thumbnails/shields/legion_shield.jpg deleted file mode 100644 index be047a4..0000000 Binary files a/public/images/thumbnails/shields/legion_shield.jpg and /dev/null differ diff --git a/public/images/thumbnails/swords/2.jpg b/public/images/thumbnails/swords/2.jpg index c6566dc..448f10b 100644 Binary files a/public/images/thumbnails/swords/2.jpg and b/public/images/thumbnails/swords/2.jpg differ diff --git a/public/images/thumbnails/swords/3.jpg b/public/images/thumbnails/swords/3.jpg index 4e21bac..35dd6f3 100644 Binary files a/public/images/thumbnails/swords/3.jpg and b/public/images/thumbnails/swords/3.jpg differ diff --git a/public/images/thumbnails/swords/4.jpg b/public/images/thumbnails/swords/4.jpg index b9957b3..f2218d7 100644 Binary files a/public/images/thumbnails/swords/4.jpg and b/public/images/thumbnails/swords/4.jpg differ diff --git a/public/images/thumbnails/swords/5.jpg b/public/images/thumbnails/swords/5.jpg index 3ead88a..e3c3eed 100644 Binary files a/public/images/thumbnails/swords/5.jpg and b/public/images/thumbnails/swords/5.jpg differ diff --git a/public/images/thumbnails/swords/6.jpg b/public/images/thumbnails/swords/6.jpg index dd16d84..515b80a 100644 Binary files a/public/images/thumbnails/swords/6.jpg and b/public/images/thumbnails/swords/6.jpg differ diff --git a/public/images/thumbnails/swords/7.jpg b/public/images/thumbnails/swords/7.jpg index 501895f..bc95c3d 100644 Binary files a/public/images/thumbnails/swords/7.jpg and b/public/images/thumbnails/swords/7.jpg differ diff --git a/public/images/thumbnails/swords/8.jpg b/public/images/thumbnails/swords/8.jpg new file mode 100644 index 0000000..333cefa Binary files /dev/null and b/public/images/thumbnails/swords/8.jpg differ diff --git a/public/images/thumbnails/swords/9.jpg b/public/images/thumbnails/swords/9.jpg new file mode 100644 index 0000000..1b6d253 Binary files /dev/null and b/public/images/thumbnails/swords/9.jpg differ diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 0ad523e..5928592 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -12,15 +12,15 @@