CustomerController.php 938 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Support\Facades\Route;
  4. use Illuminate\Http\Request;
  5. use App\Models\Client;
  6. use App\Models\Customer;
  7. class CustomerController extends Controller
  8. {
  9. public function customers(Request $request, Client $patient){
  10. $customers = Customer::where('client_id', $patient->id)->paginate(25);
  11. return view('app.patient.company-client.customers', compact('patient', 'customers'));
  12. }
  13. public function customersList(Request $request, Client $patient){
  14. $customers = Customer::where('client_id', $patient->id)->paginate(25);
  15. return view('app.patient.company-client.customers', compact('patient', 'customers'));
  16. }
  17. public function customer(Request $request, Client $patient, $slug){
  18. $customer = Customer::where('slug', $slug)->first();
  19. return view('app.patient.company-client.customer', compact('patient', 'customer'));
  20. }
  21. }