Laravel - Architecture question for multilingual wwebsite with control panel and more - laravel

Good afternoon all,
I am relatively new to Laravel and software design. Recently my position within the company changed and I will now be developing the website (both back and front end) plus some utilities (forms, submitting data to database for ISO 9001 compliance etc.).
This will be an ongoing project as part of my role, so I expect this "task" to last 2 years. I have a decent understadning of PHP, HTML, CSS and have started to study Laravel.
The objective is to have within 1 year a:
CMS with CRUD capabilities for a multilingual website (or better various domains .cn, .it, .com will point to the locale version of the same laravel instance)
CMS back and front end for the website + blog
A bunch of utilities that are more concerned with submitting forms, logging data etc.
The question is: "What's the best way to GLUE all togehter?"
Should I have two separate Laravel installations (one for the website and one for the "forms/ERP part"? Or can I do that all with one installation? Pros? Cons? Things to consider?
I have a decent idea on how to implement the single components, just struggling to think long-term consequences and how to structure it all.
Thanks

Based on what I understood , You don't need to build more than one Laravel project .
You'll use Laravel MVC and sperate the folders in view , controllers For Admin (CRM) , and front .
Some packages you'll need :-
For Mutli-langugae
https://github.com/spatie/laravel-translatable
For roles and permissions
https://github.com/spatie/laravel-permission
For General Settings Crud
https://github.com/spatie/laravel-settings
BTW , you should know how to deal with blades which is powerful templating engine that is included with Laravel :- https://laravel.com/docs/9.x/blade
And you should know the basics of using the Mysql and the Elquoent Model in Laravel :- https://laravel.com/docs/9.x/eloquent
That's will be a good start for your task .

Related

OctoberCMS (Laravel) + Vue.js + Tailwind CSS Best Setup

I am new with OctoberCMS. There are few tutorials in the internet. May I ask what is the best setup may I use or possible setup may I use with this web tech stacks?
We have a project and the requirement is we need to use octobercms so that's why we have to used this octobercms.
Possible Setup:
Micro Service Setup?
Two seperate folder for OctoberCMS and Vue.js. The communication would be an API Request calls.
Then for the deployment part for the production, we will use the dist folder from Vue.js Folder. I'm not 100% sure but I think this will be my initial thought that will be possible.
May I ask for any suggestions or clarifications on what will I use project setup. Thank you.
While it would be entirely possible to have two separate web properties with October providing the API, you can also just use Vue within an October CMS theme itself. See https://github.com/scottbedard/vuetober for more information on doing that.
If your project is more of a traditional CMS requirement then I would recommend at least trying the Vuetober approach. If it's a lot more complex and is mostly utilizing October for its powerful backend features, then the API-only approach could work fine too.
The main reason you'd want to go with running vuetober is if you were going to be utilizing the AJAX framework provided by October. You can still technically use it even when October is being run as a headless CMS just providing an API, but it gets more complicated with CORS and some other stuff you have to setup to make sure it works properly.

SPA architecture to enable features or component based on account permissions?

I’m going to build an online photo editor - Single Page Application with Vue.js + Laravel (beginner in both frameworks).
How can I disable or limit some features if user account is free, and enable that if account is premium?
For example: if I want some tools like Color picker is only available to paid user, how can I do that securely?
( Vue is frontend so I’m afraid that if the logic stand totally in javascript, user with enough knowledge can modify it by dev tools to enable paid feature )
I suggest you take a look at Laratrust. It's a fantastic package for creating roles and permissions in Laravel.
Vue is indeed the frontend, but your application's logic is still performed in PHP, via Laravel. Your controllers will determine what a user's permissions are and return the appropriate data/error accordingly. There's a lot to describe here but there's tons of great resources that do it.
Rather than describing how Vue and Laravel work together, I'd point you towards Laracasts. You can learn A LOT there off just the free videos alone, well worth the money though.
https://laracasts.com/series/learn-vue-2-step-by-step/episodes/26
https://laracasts.com/series/learn-vue-2-step-by-step/episodes/27

Multi domains for one project or multi domains for multi projects

I'm planning to make the graduate project about the e-commerce site using ASP.Net Core 2 MVC and SQL Server, but currently, I have some troubles:
Suppose I have two domain and sub-domain: domain.com and manage.domain.com. The domain.com will like the normal e-commerce site which allows customer go to browse, search, and buy the products. The manage.domain.com will only for staff to log in and do their stuff like manage staff, order, etc.
My questions are:
Is there possible to manage two domains on one MVC project or I have to split them up? If it is possible, then how can I manage it just in one MVC project?
If I have to split them up to two projects: one for e-commerce, one for staff, then should I create the WebAPI to connect as a data layer to communicate the projects with the same database as the suggestion of Sagar Shirke?
Are there any other approaches to my problems? Any comments and idea will be very very appreciated.
Thanks for reading my problems!
After thinking about this some more I think you are taking the wrong approach.
Why don't you look at using a premade framework with an admin template page to manage typical admin task (users, passwords, custom data, etc.) ?
Instead of using a subdomain like sub-domain: domain.com, you could use domain.com/admin.
Here is an link to ASP.NET Boilerplate templates. I would recommend you look at the simple todo task examples and see if this is concept is what you want. Using the free Module Zero admin page templates to develop quickly. I would make sure you do the tutorials and read the documentation.
This is a great tutorial on how to use subdomains.

what is simple MVC based PHP blogging application?

I am searching for a Blogging tools like wordpress. But I want MVC based tools to extend my blog with MVC structure.
My main requirements is
Must be based on MVC
Simple & lightweight
it's blog url structure should be domain.com/cat_name/post_title , because my current wordpress blog is like that, I don't want to lose Facebook Share and Tweets.
I want a simple one, because this is learning only.
Clarifying: if a CMS you use is based on a MVC design pattern or not is irrelevant to you as an user, except if you want to meddle with its inner workings (which you don't - a CMS is made to be used and possibly extended, but in 99% of use cases, if it isn't extendable to your needs, changing the source code is a bad idea, as it will most likely break with any updates you may want to make)
You may want a MVC framework, which will in turn allow you to **code** a CMS of your own, or use a good, extendable, CMS app
The one I use is ProcessWire, which is a CMS/CMF (F stands for Framework) php app, and seems to be the kind of thing you are looking for - it manages your content for you (the default installation comes with a few demo pages) but you define the fields, and you use them to display your content at will. Check it out - the user forum is quite active, and people there are really helpful.
Well there are tons of Content Managment System Based on MVC frameworks (eg . CodeIgniter ) . I personally recommend Pyro ( Based on CodeIgniter) but other also seem promising . but i don't know much since i haven't tried .
Note that this is a highly relative question and will bring forth a ton of opinions and not real answers. With that in mind, here is my answer.
I know of a tool that you can use to install an MVC template for and on top of ProcessWire along with basic project managing tasks using gulp. Note, the M will be considered ProcessWire.
Have a look on github.com and look at the profile of fixate and repo generator-fixate-pw. (ie: generator-fixate-pw, added the sentence if the link breaks).
Install this by following the instructions on the repository. The tool is very specific but learning to use the framework helped improve my php skills allot (still learning allot).
Whether the CMS will be used as a blog or not will depend on your implementation of the install.

Advise needed - which Rapid Application Development Framework using PHP and MVC meets this specific need?

we are a parents initiative who runs a small kindergarden / child nursery and we set out to build a basic web based documentation and reporting application for our nursery.
After spending a week doing research on the various PHP MVC frameworks, I have a few questions that I could not answer myself - even after having a closer look (installed on local machine) at CakePHP, Symfony, CodeIgniter, YII and Joomla.
The goal is to build a web application where site managers, staff and parents (roles) can log in to do simple tasks, depending on their role (hence I need a RBAC). Site managers will for example be able to add staff to the database, staff will be able to add children and do some documenation on children (select a child and enter details on special needs etc.). Parents should be able to update information about who is picking up the child, or inform the staff if a child will not come in at a certain date.
Now, since this is all basic CRUD with only a few tables underneath, tables connected via some foreign key constraints, I would like the framework to generate CRUD skeletons for me.
And since I need to manage roles and limit access to certain pages, I would like a basic user management out of the box.
Plus, PHP and MySQL and MVC are set - otherwise I would have used Oracle Apex as I have some experience with that.
So, I looked at a vast amount of PHP frameworks and found the following to be promising:
CodeIgniter (with Bonfire plugin)
Symfony2
YII framework with GII
CakePHP
Joomla
BUT none of the frameworks I looked at seemed to fit my need:
creating CRUD skeleton pages based on my ERD with foreign keys (MySQL InnoDB) / Scaffolding
offering a basic user management out of the box with up to date security measures in place (passwords stored using phpass or salted hashes & md5, user registration, defining roles and limiting tasks to roles/users).
If somebody could suggest a PHP Framework that comes with those two requirements build in, I would be very happy to hear about it. THANK YOU very much in advance!!
(I really liked CodeIgniter because it was simple to set up and lightweight, I liked the Bonfire user management plugin but was disappointed when I found out they sacked scaffolding in the lasted release
And I liked Joomla for its user management, but found it quite hard to get started on component development, plus no scaffolding).
You should check FuelPHP and its ORM, Oil and Auth packages. It's really great. If you liked CodeIgniter, you'll probably love Fuel.
http://www.fuelphp.com

Resources