vendredi 28 avril 2017

Controllers in vendor folders - my controllers - what is the right approach?

So I use a package from github ticketit(http://ift.tt/2peZ7aQ) and this package has controllers included.

And I integrated it into fresh laravel application.

now, I want to add an API endpoints into my application, my question is

should I copy the controllers from the ticketit package in the vendor directory and create my app/http/controllers folder or should I access the controllers in the vendor ? or are there any good design out there I should do?

so what i'm planning to do is

Route::get('api/v1/getdata','TicketsController@data');

Route::get('/getdata','TicketsController@data');

Please help on the design,

If I try to edit the controllers inside the vendor folders and upload it in server for sure it will not be upload.

btw, I'm using Laravel 5.4 and Laravel passport.

Aucun commentaire:

Enregistrer un commentaire