php - Where to put custom/new class file in Laravel? -
i have php example on how use yelp fusion api. uses oauth.php
file several classes. in main example imported with
require_once('lib/oauth.php');
can same in laravel?
or i'd better provide namespace oauth.php
file , put somewhere on tree? put it?
i suggest make new directory inside app , call "classes" , store oauth.php "/app/classes/oauth.php". don't forget put namespace app\classes;
top of file.
due having several classes inside file suggest rewrite bit , separate each class file
Comments
Post a Comment