title: How to use functions in services.php laravel config file
body: <p>I needed to use a <strong>dynamic callback</strong> url for socialite so I added the <code>url()</code> function to my services.php file it worked fine(and its still working on my live server) But when tried to start the project locally I get the following error. When I remove the <code>url()</code> method everything works fine please help.</p>
  
  <pre><code>PHP Fatal error:  Uncaught ReflectionException: Class log does not exist in /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php:734
  Stack trace:
  #0 /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php(734): ReflectionClass-&gt;__construct('log')
  #1 /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\Container\Container-&gt;build('log', Array)
  #2 /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container-&gt;make('log', Array)
  #3 /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php(849): Illuminate\Foundation\Application-&gt;make('log')
  #4 /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php(804): Illuminate\Container\Container-&gt;resolveClass(Object(ReflectionParameter))
  #5 /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php(7 in /home/fenn/projects/jokwit/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 734
  </code></pre>
  
  <p>Here is my services.php file </p>
  
  <pre><code>&lt;?php
  
  return [
  
      /*
      |--------------------------------------------------------------------------
      | Third Party Services
      |--------------------------------------------------------------------------
      |
      | This file is for storing the credentials for third party services such
      | as Stripe, Mailgun, Mandrill, and others. This file provides a sane
      | default location for this type of information, allowing packages
      | to have a conventional place to find your various credentials.
      |
      */
  
      'mailgun' =&gt; [
      'domain' =&gt; env('MAILGUN_DOMAIN'),
      'secret' =&gt; env('MAILGUN_SECRET'),
      ],
  
      'mandrill' =&gt; [
      'secret' =&gt; env('MANDRILL_SECRET'),
      ],
  
      'ses' =&gt; [
      'key'    =&gt; env('SES_KEY'),
      'secret' =&gt; env('SES_SECRET'),
      'region' =&gt; 'us-east-1',
      ],
  
      'stripe' =&gt; [
      'model'  =&gt; App\User::class,
      'key'    =&gt; env('STRIPE_KEY'),
      'secret' =&gt; env('STRIPE_SECRET'),
      ],
  
      'facebook' =&gt; [
      'client_id' =&gt; '1700935300171729',
      'client_secret' =&gt; 'XXXXXXXXXXXXXXXXXXX',
      'redirect' =&gt; url('/facebook/callback'),
      ],
  
  
      'google' =&gt; [
      'client_id'     =&gt; 'XXXXXXXXXXXXXXXXXXXXXXXX',
      'client_secret' =&gt; 'XXXXXXXXXXXXXXXXXXXXXXXX',
      'redirect'      =&gt; url('google/callback'),
      ],
  
  
      ];
  </code></pre>