Codeigniter and Raw PHP in one project sharing one database - php

I am in the process of creating a booking portal for salons. My problem is that salon owner admin panel project is created in raw PHP, but salon directory website and customer dashboards are created in Codeigniter framework. Is it possible to merge these two projects together and use some tables from raw PHP project database in Codeigniter project. This is my first project and I'm confused. Any help or advice is appreciated.

Create a brand new application project in Codeigniter. As long as there is a database, you can create any application in multiple languages and frameworks. I would suggest having a look at Laravel as Codeigniter is quite dated and wouldn't allow you to scale easily as things grow complex.

Related

Yii framework for building API's

I have been working with Yii for some years, since version 1. I think is an awesome framework.
Today I need to build a website using Yii which includes building an API, administrator and frontend site.
In the past when I have worked in other similar projects. I shared model between them, each side (api, frontend and administrator) have their own controllers.
With Yii I am trying to find a way to organize it to take advantage of the full power of yii.
I was planning to use API only for mobile apps not for web frontend to be able to use Yii validation rules, etc and speed up the project.
Project owner wants to build a frontend which reads data through API too, that will bring duplicated validation rules etc.
If I follow project owner requirement it will be like managing 3 projects
1. Api + Backend
2. Frontend
3. Mobile
If I follow the other option, it will be like managing 2 projects:
1. API + Frontend + Backend
2. Mobile
Any advice?
Use the advanced application template, make the common directory a git subtree. Then, you can use the subtree in any number of projects. There you are maintaining only one set of models for several applications. Works great for me.

Advanced database search for a Codeigniter CMS

I'm fairly new to the Codeigniter and MVC framework, I'm building a content management system (CMS) and I've got the basics done.
I need to be able to search through my companies databases and compile reports based on the results, does anyone know of a good library for this or am I going to have to build one from scratch? I'm using the latest version of CI and I'm using the ion_auth authentication library for my user login, all this is working great!
Check out this thread on
CMS based on CodeIgniter
If this is more advance stuff and you wanted simple crud tutorials (Create update and destroy data) check out : http://avenir.ro/create-cms-using-codeigniter-3/ and for documentation check out https://www.codeigniter.com/user_guide/

laravel or lumen, which one to choose?

I am a student and I'm making a project, an application which will show data to users on web end and also on android application. but I am confuse which one to choose for backend development, Laravel or Lumen ? My application will have signup function and displayed data from mysql against search queries. There will be 4 to 5 tables and multiple columns in each table. also images to show. So which one I should choose?
From what you have described so far Laravel seems like a perfect fit. Start off with laravel, if you need more speed and a framework focused towards building web services give lumen a try. If you haven't worked with PHP or any other backend app before, go with vanilla PHP.
Goodluck with the app!
If you only need to build an API use Lumen, otherwise Laravel
Well, I recommend Laravel rather than Lumen (Frankly speaking, CI framework may be more suitable, which is simpler and friendly to new user). About 1.5 years ago, I experienced the same dilemma, just like you. For lacking of enough document, I have to migrate my project from Lumen to Laravel when I came across some problems.

Laravel Passport for Authenticating Multiple Installations

I'm looking to recreate some internal systems using Laravel 5.3 as the internal systems need rebuilding. I am still fairly new to Laravel as we have used a bespoke framework based on PHP 4 for a few years, which is starting to show its' age.
The current setup makes use of having a users table for each application, which from my knowledge is not efficient as the userbase is shared (open to all employees).
Would I be right in thinking that I can set up a Lumen application, with a database of users, and then use Laravel Passport to make it an OAuth2 server? Say for example, passport.company.com and then new users are registered via this application.
Therefore, another two applications using Laravel i.e. CRM and CMS can then use the Passport system for authentication, rather than having to create users tables for each application?
If this is on the right lines, or there are better alternatives, I would be grateful to hear your feedback.
Thanks!
Edit: It appears that I'd need Laravel for all applications and not Lumen, after reading further into it.
I'm still curious as to know if I am on the right track however?

How to architect a multisite manager application?

I'm trying to create a web application to manage multiple websites. I'm still not sure what platform to built upon this kind of app, Node.js or Laravel (PHP). I want the application to be scalable to millions of users with an average of 2 sites each.
Would you recommend SQLLite3, JSON or MYSQL for storing all individual site's data in separate files or a single database with all individual site's data?
How can I prevent users from hacking into each others site?
mainSite >
Common
Site1/config.json, content/posts/, layout/
Site2/config.json, content/products/, layout/
Site3/config.json, content/pages/, layout/
I'm still not final on the above structure. Please help me with getting started with this app.
For scalable system you should use some system that will allow you easy redistribute resourses, so in this case i think node.js is better one, you could find many services that shares resourses for node.js
Big plans. Lots of work. My advise start small.
Setup one website with laravel and see how far you get.
You will get one website with multiple pages.
Laravel is easy, scales, has tons of extensions and a living, vivid community.
You have the choice to clone the website and set the same thing up under a different domain or just a subdomain.

Categories