Thursday, March 30, 2017

Laravel access config data inside of Helpers class

<?php

namespace App;

class Helpers {

public static function url()
{

     echo config('api.url');
}

I have a helpers file required access config data. I tried but i got fatal error.

anyone know how to achieve this?



via Benjamin W

Advertisement