How do I implement and configure codeigniter with orientdb?. Ofcourse with step by step instructions. Such as how to set the database configuration file, querying, etc.
Related
I've developed an app which fetches data from an API based on Laravel 5.5. The marketing landingpage of the app is based on Craft CMS Version 3. The marketing website and the API and the databases of both systems are running on the same server.
I want to generate landingpages for each row of table X of the Laravel database.
www.website.com/awesome-landingpage-about-{slug}
What is the best approach to realize this?
I don't want to fetch the data directly from Laravel's database
I don't want to synchronize the Craft CMS database with the Laravel (add/remove the rows from the laravel's database as entries to Craft)
It would be awesome to be able to have an entry-type "Landingpage" where we can optionally create a landingpage, referencing to an ID of the laravel table and add additional content for the landingpages.
Would be a JSON-API from Laravel to Craft CMS Plugin a good performant idea?
One option would be to use a Dynamic Route and just fetch the data from 127.0.0.1 (because same server) from the template file? Or is there a smarter way in Craft CMS?
Let's start of by:
"I don't want to fetch the data directly from Laravel's database"
I'm assuming you don't want to write code in CraftCMS to access another project's database. Good. IF you plan on having them do seperate jobs and use Laravel API for fetching data alone, let it handle it's own database.
"I don't want to synchronize the Craft CMS database with the Laravel (add/remove the rows from the laravel's database as entries to Craft)"
So, this is my question:
You want to be able to create landing pages based of Laravel's rows alone or based of Laravel's database row's and CraftCMS's?
It all comes down to how well you want to abstract both frameworks.
I would probably tell laravel to accept requests from authenticated user (a CraftCMS User) or from localhosts (from within the machine alone) and I'd create endpoints to add/remove/edit/get data at my disposal. I'd then fetch rows from Laravel and combine with my own (assume I'm the CMS).
Even in an intranet network, the request to tell laravel to access the database is longer than to access the database from CraftCMS, so you should expect a dependency between the two projects.
For point 3, you'll have to store information on each database about something. On CraftCMS's to store at least the ID's it's going to request to laravel and laravel will have to get an endpoint where it can insert new stuff, if you're planning on having additional content there.
I'm not entirely sure if I got the idea you're trying to show when you say "add additional content for the landing pages" but I'd try to keep it simple and abstract it's uses, Laravel to store this 'information' that the CMS shouldn't handle in the first place (or you can work out some extra tables and import them to the other database).
Impact performance? Depends on the ammount of data you've got
I'm developing a CRM and i need to access customers database. whole CRM uses mysql to store data. but customers data stored in ms sqlserver.
by default to add another database in codeigniter,it should added from config file. but i want to add it using controller(like cms as wordpress,joomla,etc).
well you cannot update database settings dynamically, as they're loaded long before the controller is initialized.
However, what you could do is, add another set of database config, write into the database.php file using codeigniter file helper using this link.
write_file(APP_PATH.'/config/database.php', $data, 'r+');
Basically you open the file in write mode and set the database config into it.
This is one way of doing it. Just an idea.
I have a static site with a lot of pages. Now I got a new requirement. Client need a Client Area, I am thinking to use laravel Database Eloquent, Session, Form/html, Session and want to use them as alias like use in laravel/lumen. The problem is that I want static pages same as it is with .html extension, is there any solution? I want some packages with aliases to speed up.
I spent a complete day on Configuring Input and Eloquent but I wasn't able to setup to other packages. But I don't know how to set aliases and service providers. Any idea?
Specific:
I need Laravel Some packages
Session,
FileSystem
Mail
Input
Database
Html/Form,
Validation
I don't need others packages and need aliases same as laravel used in (config/app)
yes you can use laravel components outside laravel project please read the article : http://www.richardbagshaw.co.uk/using-illuminate-components/
I'd like a module to install some content, for instance add some static blocks to the CMS section when the module is installed (I know how to do this).
It'd only be PHP and Magento stuff, there's no direct need for SQL, no database table, nothing like that.
So a generic PHP script that configures Magento the right way, but only during installs or upgrades of that particular module.
I know I could use the Setup Resource mysql4-install-#.#.#.php script method for this, but that just feels plain wrong.
Any ideas?
This is an appropriate usage - you are working with the database if you are adding or updating CMS. In fact, it's how the initial homepage fixture data is implemented.
Note that in CE >= 1.6 and EE >= 1.11 there is a complete DDL which should be used: ALTER TABLE in Magento setup script without using SQL
Thats not wrong at all. The setup resource is there to perform one-time-only actions. I personally think that that is a perfect use of the Install resource. You don't have to use it to do direct DB queries. You can also use it to make indirect DB queries (which is what you're doing when you add new content to the CMS)
My client's website runs on Joomla and they would like me to add some custom functionality to the site.
It is a quotation system, so they will just need to be able to update the values that are used to caluclate the quote. So there would only need to be 4 parts to this:
Settings page in the admin section
Database table that stores the settings
Front end form
PHP script to process the form / query the database table
If I was not using a CMS I could easily accomplish this task but my client would like this system to be integrated with Joomla. Can anyone advise how I should approach this?
You should be able to accomplish this easily with Chronoforms and Chrono Connectivity from Chrono Engine. Use the Chronoforms to create the forms that access the data and Connectivity to display and edit the data.
Forms - http://extensions.joomla.org/extensions/contacts-and-feedback/forms/1508
Connectivity - http://extensions.joomla.org/extensions/directory-a-documentation/faq/5661
Try the Joomla Component Creator it will allow you to get started writing your logic.