Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shady Hesham's avatar

How to do license on laravel project

I have a project that i install into host with accessing to the cpanal, but i am afraid that the client take it to use else where. So i am looking for a way to protect my project to not be used anywhere except the url that i deal with. knowing that i have the full access to the Capanl, should i implement a licence on laravel? And how? Or is there another way in capanl that i make the folder not be downloading or deleting, or should i do something like of the url is different delete all file and database, acutely i have no idea what is the best way to do it

0 likes
11 replies
vincent15000's avatar

You probably mean a license on your application and not on Laravel.

I don't have any answer, but I'm interesting in if someone knows how to do ;).

garrettmassey's avatar

@vincent15000 while I'm not sure how you would go about setting up a license key for an application that the client has full access to the codebase for, if possible what I would do is set up your application to send and receive API calls, and then host the application on your own servers.

Once you have that set up, clients can sign up, make payments, and then use their credentials to access the API and hook their systems into yours. If payments don't go through or the credentials are incorrect, then the API restricts access. This way, you have full control over the application, the access, who can and can't use it, etc.

Helmchen's avatar

If you don't want someone to access your sourcecode, don't give him access to it. it's that simple ;)

If the customer paid (enough) for it, he may aswell do whatever he wants with it.

Sure he could hire someone else and ditch you - but that's life.

However, I would argue that a customer doesn't hire you because they have their own plans with the source code, but so that they don't have to spend time getting it to work. I would just make sure that the customer pays enough in the first place.

That's just my opinion on the topic. Licensing sucks.

jlrdw's avatar

If the code was written for a specific client app, then they have the right to the code as well. Otherwise set it up as a SaaS application, and have an API that doesn't allow access to the code.

1 like
vincent15000's avatar

@jlrdw Yes that's right ... well ... some pakages have a free version to explore the free functionalities and a pro version which is not free and needs a key license. I'm not sure that it works with an API to unlock the pro functionalities (well ... in fact I don't know). For packages with free AND pro functionalities, is the pro code already downloaded with the free version and only unlocked by a key license ? In such case any developer could unlock by updated the source code.

1 like
kokleng's avatar

I know this post is a year ago. but i still want to know to how to put license into project? like codecanyon does !!!

Snapey's avatar

@kokleng your contract with the customer should cover this. If they pay you to develop the site, they will assume that they own the intellectual property (IP) and can do what they like with it

1 like
kokleng's avatar

@Snapey but i want to do this because i want to protect it with other developer who work with me or join for the development. after they leave or stop. i concern of they have my code and use it for their business ( and i don't know). example : they just change some UI, change some UX ... but the process behind it is my system.

I want to ask this because i want to know how to protect my code if one day i can start up the company or i can lead the team. then i want to protect all source code. thanks.

martinbean's avatar

i concern of they have my code and use it for their business ( and i don't know). example : they just change some UI, change some UX ... but the process behind it is my system.

I want to ask this because i want to know how to protect my code if one day i can start up the company or i can lead the team. then i want to protect all source code. thanks.

@kokleng Then don’t work with people you don’t trust. You can’t “protect” source code that you’ve given to someone.

All a license is, is a file saying who can do what (if anything) with your code.

1 like
Snapey's avatar

@kokleng employers have terms in the contract of employment that says they cannot just copy their employer's stuff.

1 like

Please or to participate in this conversation.