Skip to content

Commit

Permalink
Resolving namespace, Folders in place
Browse files Browse the repository at this point in the history
  • Loading branch information
nishangupta committed Dec 31, 2020
1 parent e4ec38f commit aaa7a2f
Show file tree
Hide file tree
Showing 46 changed files with 92,709 additions and 68 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/MyCancellationController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use Illuminate\Http\Request;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Carousel;
use Illuminate\Http\Request;
use RealRashid\SweetAlert\Facades\Alert;
Expand All @@ -13,12 +14,12 @@ class CarouselController extends Controller
public function index()
{
$carousels = Carousel::latest()->paginate(15);
return view('carousel.index', compact('carousels'));
return view('admin.carousel.index', compact('carousels'));
}

public function create()
{
return view('carousel.create');
return view('admin.carousel.create');
}

public function store(Request $request)
Expand All @@ -38,7 +39,7 @@ public function store(Request $request)

public function edit(Carousel $carousel)
{
return view('carousel.edit', compact('carousel'));
return view('admin.carousel.edit', compact('carousel'));
}

public function update(Request $request, Carousel $carousel)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Category;
use App\Models\SubCategory;
Expand All @@ -16,7 +17,7 @@ public function __construct()
public function index()
{
$categories = Category::with('subCategory')->get();
return view('category.index', compact('categories'));
return view('admin.category.index', compact('categories'));
}
public function create()
{
Expand All @@ -42,7 +43,7 @@ public function store(Request $request)

public function edit(Category $id)
{
return view('category.edit')->with([
return view('admin.category.edit')->with([
'category' => $id
]);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\CustomerQuestion;
use Illuminate\Http\Request;
use App\Models\Product;
Expand All @@ -12,13 +13,13 @@ class CustomerQuestionController extends Controller
//admin
public function adminView()
{
return view('customer.customer-question');
return view('admin.customer.customer-question');
}

public function adminReply($id)
{
$question = CustomerQuestion::where('id', $id)->with('user', 'product.productImage')->first();
return view('customer.reply', compact('question'));
return view('admin.customer.reply', compact('question'));
}

public function reply(CustomerQuestion $id, Request $request)
Expand Down Expand Up @@ -47,7 +48,7 @@ public function massDelete(Request $request)
public function index()
{
$questions = auth()->user()->questions()->with('product')->paginate(20);
return view('customer-question.index')->with([
return view('admin.customer-question.index')->with([
'questions' => $questions
]);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
use Illuminate\Http\Request;
use RealRashid\SweetAlert\Facades\Alert;
Expand All @@ -16,7 +17,7 @@ public function __construct()

public function index()
{
return view('order.delivered');
return view('admin.order.delivered');
}

public function store(Request $request)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\FlashSale;
use App\Models\Product;
use Illuminate\Http\Request;
Expand All @@ -15,11 +16,11 @@ public function __construct()
}
public function index()
{
return view('flash-sale.index');
return view('admin.flash-sale.index');
}
public function create()
{
return view('flash-sale.create');
return view('admin.flash-sale.create');
}

public function store(Request $request)
Expand Down Expand Up @@ -52,7 +53,7 @@ public function edit(FlashSale $id)
{
//here the id become an instance of flashsale
$product = Product::where('id', $id->product_id)->with('productImage')->first();
return view('flash-sale.edit')->with([
return view('admin.flash-sale.edit')->with([
'flashSale' => $id, //here the id is an instance of flashsale
'product' => $product,
]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use App\Http\Controllers\Controller;
use App\Models\Product;

class InvoiceController extends Controller
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
use RealRashid\SweetAlert\Facades\Alert;
use Illuminate\Http\Request;
Expand All @@ -16,7 +17,7 @@ public function __construct()
}
public function index()
{
return view('order.index');
return view('admin.order.index');
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\Product;
use App\Models\SubCategory;
Expand All @@ -18,14 +19,14 @@ public function __construct()

public function index()
{
return view('product.index');
return view('admin.product.index');
}

public function create()
{
$categories = Category::get(['id', 'category_name']);
$subCategories = SubCategory::get(['id', 'subCategory_name', 'category_id']);
return view('product.create')->with(
return view('admin.product.create')->with(
[
'categories' => $categories,
'subCategories' => $subCategories
Expand All @@ -51,7 +52,7 @@ public function edit(Product $product)
{
$categories = Category::get(['id', 'category_name']);
$subCategories = SubCategory::get(['id', 'subCategory_name', 'category_id']);
return view('product.edit')->with([
return view('admin.product.edit')->with([
'product' => $product,
'categories' => $categories,
'subCategories' => $subCategories
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Models\Product;
Expand Down Expand Up @@ -49,7 +49,7 @@ public function store(Request $request, $id)
//$id -- Product id
public function show(Product $id)
{
return view('product.show')->with([
return view('admin.product.show')->with([
'product' => $id
]);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ReadyToShipController extends Controller
{
Expand All @@ -14,7 +15,7 @@ public function __construct()

public function index()
{
return view('order.ready-to-ship');
return view('admin.order.ready-to-ship');
}

public function store(Request $request)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use RealRashid\SweetAlert\Facades\Alert;

class ReturnedController extends Controller
Expand All @@ -16,7 +17,7 @@ public function __construct()

public function index()
{
return view('order.returned');
return view('admin.order.returned');
}

public function store(Request $request)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use RealRashid\SweetAlert\Facades\Alert;

class ShipCancelledController extends Controller
Expand All @@ -16,7 +17,7 @@ public function __construct()

public function index()
{
return view('order.ship-cancelled');
return view('admin.order.ship-cancelled');
}

public function store(Request $request)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\Order;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class ShippedController extends Controller
Expand All @@ -14,7 +15,7 @@ public function __construct()

public function index()
{
return view('order.shipped');
return view('admin.order.shipped');
}

public function store(Request $request)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;

use App\Models\User;
use RealRashid\SweetAlert\Facades\Alert;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;

class UserManagementController extends Controller
{
public function index()
{
return view('user-management.index');
return view('admin.user-management.index');
}
public function store(Request $request)
{
Expand All @@ -35,7 +36,7 @@ public function destroy(User $id)

public function getAllUsers()
{
return view('user-management.all')->with([
return view('admin.user-management.all')->with([
'users' => User::with('userInfo')->paginate(25),
]);
}
Expand Down
12,492 changes: 12,490 additions & 2 deletions public/css/admin.css

Large diffs are not rendered by default.

11,579 changes: 11,577 additions & 2 deletions public/css/app.css

Large diffs are not rendered by default.

17,483 changes: 17,481 additions & 2 deletions public/js/admin.js

Large diffs are not rendered by default.

37,356 changes: 37,354 additions & 2 deletions public/js/app.js

Large diffs are not rendered by default.

13,719 changes: 13,717 additions & 2 deletions public/js/shop.js

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit aaa7a2f

Please sign in to comment.