title: change page details based on URL by using if statement
body: <p>i am new to PHP but I would like to make the content of the page change depending on the invoice selected by using if statement but I tried numerous ways which did not work out for me since I am using a pdf export package for laravell. my goal is to show different content based on the page url. Here is the controller</p>
  <p>InvoiceController</p>
  <pre><code>&lt;?php
  namespace App\Http\Controllers;
  
  use LaravelDaily\Invoices\Invoice;
  use LaravelDaily\Invoices\Classes\Buyer;
  use LaravelDaily\Invoices\Classes\InvoiceItem;
  use App\Models\Invoice1;
  
  class InvoiceController extends Controller
  {
      
      public function show()
      {
          if('http://localhost/Laravel/HotelManagement/admin/invoice/1') {      
          $customer = new Buyer([
              'name'          =&gt; 'Ahmed',
              'custom_fields' =&gt; [
                  'Email' =&gt; 'test@example.com',
              ],
          ]);
  
          $item = (new InvoiceItem())-&gt;title('Reservation 1')-&gt;pricePerUnit(245);
  
          $invoice = Invoice::make()
              -&gt;buyer($customer)
              -&gt;series('10')
              -&gt;sequence(10000)
              -&gt;dateFormat('m/d/Y')
              -&gt;currencySymbol('SR')
              -&gt;discountByPercent(10)
              -&gt;taxRate(15)
              -&gt;addItem($item);
  
          return $invoice-&gt;stream();
      }
      else if('localhost/Laravel/HotelManagement/admin/invoice/2'){
          $customer = new Buyer([
              'name'          =&gt; ' Abdullah',
              'custom_fields' =&gt; [
                  'Email' =&gt; 'test@example.com',
              ],
          ]);
  
          $item = (new InvoiceItem())-&gt;title('Reservation 2')-&gt;pricePerUnit(467);
  
          $invoice = Invoice::make()
              -&gt;buyer($customer)
              -&gt;series('10')
              -&gt;sequence(10000)
              -&gt;dateFormat('m/d/Y')
              -&gt;currencySymbol('SR')
              -&gt;discountByPercent(10)
              -&gt;taxRate(15)
              -&gt;addItem($item);
  
          return $invoice-&gt;stream();
      }
      }
  }
  </code></pre>
  <p>Route</p>
  <pre><code>Route::get('admin/invoice/{id}/',[InvoiceController::class, 'show']);
  </code></pre>