Level 52
Yes. It will be autoloaded automatically.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to pull in a PHP Stock Ticker (https://github.com/scheb/yahoo-finance-api) which uses composer but no mention of Laravel.
Is there a way to use this in Laravel 5.1?
Not on top of Controller of course but within your controller methods.
eg.
namespace \App\Http\Controllers;
use \App\Http\Controller;
use Scheb\YahooFinanceApi\ApiClient;
class MyController extends Controller{
protected $apiClient;
public __construct(){
$apiClient = new \Scheb\YahooFinanceApi\ApiClient();
}
}
Please or to participate in this conversation.