Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| OrderController | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| index | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Controllers\Influencer; |
| 4 | |
| 5 | use App\Http\Controllers\Controller; |
| 6 | use App\Models\Order; |
| 7 | use Illuminate\View\View; |
| 8 | |
| 9 | class OrderController extends Controller |
| 10 | { |
| 11 | public function index(): View |
| 12 | { |
| 13 | $influencer = request()->user()->influencer; |
| 14 | $orders = Order::query()->with('items', 'commission')->where('influencer_id', $influencer->id)->latest('placed_at')->paginate(20); |
| 15 | return view('influencer.orders.index', compact('orders')); |
| 16 | } |
| 17 | } |