SOG's avatar
Level 3

Please how do I use laravel to connect to a tracking device protocol

Am working on tracking cars with Cncote CE-09N model

0 likes
8 replies
SOG's avatar
Level 3

I have gotten an open source package, but am a little bit new to laravel I cant find the routes folder but I can see routes within the Domain folder. Please can some explain how that works

Snapey's avatar

@SOG there is no domain folder in Laravel. Are you looking at the right thing?

lift_spindle's avatar

if you share a link to the repo that you found, we may be able to guide you.

when I googled for 'Cncote CE-09N' I was able to find this user manual: https://www.cncotegps.com/Uploads/pro/Made-in-China-Cncote-GPS-Car-GPS-Tracker-Voice-monitor-CE-09N.22.2.pdf

it's not very indepth. I'm seeing indications about a SIM card and sms and pointing to a server. Have you found any videos on youtube about how to set up a Cncote CE-09N?

In a laravel app, you typically make your own routes in the appRootFolder > routes > web.php

If you pull in a package and your site has pages and routes that you didn't create, then you will likely find the source of that in appRootFolder > vendor > theNameOfTheVendor > theNameOfThePackage > someWhereInThePackage. Wherein 'someWhereInThePackage' is a folder like 'views' or 'routes'.

aleahy's avatar
aleahy
Best Answer
Level 25

@SOG Someone decided to structure this app a little differently to the typical laravel apps. If you go and look at the app/Providers/Route.php file, you will see that they are mapping the routes to the router.php file in each app/Domain/*/Controllers folder. Eg: There is one in app\Domain\Alarm\Controllers.

So this structure is, I guess, like Domain Driven Development. They are creating mini laravel apps inside each Domain folder to keep things separate.

1 like
SOG's avatar
Level 3

@aleahy Thanks so much now I understand the project

But how do I restructure it to follow normal laravel project

aleahy's avatar

@SOG That's a really big ask with a lot of work. Someone has spent a lot of time structuring it this way. I wouldn't change it back to be like a traditional laravel app. It would be easier to just focus on the domains you want to use and learn how they work in the app. A lot of the classes seem to inherit from the Core domain, so when you get stuck, trace the classes back up the tree to where they inherit from to understand what they do.

1 like

Please or to participate in this conversation.