Installation on Existing Laravel Project
Created 7 years ago by andrew

Hello! I've read that it's possible to install Pyro on top of an existing Laravel installation: "If needed, you can add Pyro's core and addons to any Laravel installation with composer and enjoy all of it's benefits." Is there any documentation on the best way to do this?

rickkuk  —  7 years ago

I would imagine that you just update your composer.json or do something like "composer require ....." for the core module and whatever addons you want. I'm unsure of the actual package names to put though.

rickkuk  —  7 years ago
$ composer search pyrocms
anomaly/robots-extension A simple robots.txt generator.
pyrocms/pyrocms-theme The official admin theme for PyroCMS.
pyrocms/starter-theme The starter theme is a basic HTML5 Bootstrap theme based on the Freelance Theme from http://startbootstrap.com/template-overviews/freelancer/
pyrocms/pyrocms PyroCMS is a powerful, easy to use CMS built for everyone.
pyrocms/pyrocms-theme The official admin theme for PyroCMS.
pyrocms/lex A lightweight template parser.
pyrocms/starter-theme The starter theme is a basic HTML5 Bootstrap theme based on the Freelance Theme from http://startbootstrap.com/template-overviews/freelancer/
huglester/pyrocms-helpers PyroCMS helpers to work with Eloquent and others.
anomaly/robots-extension A simple robots.txt generator.
anomaly/navigation-module Powerful navigation management made easy.
websemantics/entity_builder-extension Modules & Streams Scaffolder for Maximum Coding Pleasure
anomaly/url-field-type A URL field type.
anomaly/textarea-field-type A simple textarea field type.
anomaly/text-field-type A simple text input field type.
anomaly/slug-field-type A slug formatted string field type.
anomaly/slider-field-type A range slider field type.
anomaly/select-field-type A select dropdown field type.
anomaly/relationship-field-type An entry relation field type.

I'm guessing pyrocms/pyrocms will give you everything. Though I'm not really sure how installing it will effect your current routes setup.

andrew  —  7 years ago

Cool, thanks rickkuk. I'll give some of this a whirl and let y'all know. I'm in a bit of a unique situation in that I have my schema, views, routes, etc. created/organized pretty much just the way I need for my application, but need an interface so my colleagues can enter content into the DB. So I'm wondering if Pyro can work with my existing models created outside of Pyro, adding/updating/deleting rows and many-to-many pivot tables.

ryanthompson  —  7 years ago

Hi Andrew! Yes you definitely can.

The first thing you need is the streams-platform package: https://github.com/anomalylabs/streams-platform

And to add it's service provider: https://github.com/pyrocms/pyrocms/blob/3.0/master/config/app.php#L149

From there I think there is only a dependency on the settings-module. But I would at least start with users-module, settings-module and the helper-plugin.

There are a couple things done here that you might want too in order to preserve some of the auto-language detection and CLI application flag for running things like php artisan do:something --app=my_app if you have multiple apps running on Pyro: https://github.com/pyrocms/pyrocms/blob/3.0/master/bootstrap/app.php#L29-L42

That's about it that I can think of!

ryanthompson  —  7 years ago

I would suggesting getting the core in and registering the service provider first - then migrating it a normal php artisan migrate.. Then start adding addons as needed / if desired.

ryanthompson  —  7 years ago

Andrew once you get to the point where you have streams platform in your system / working and you can use your app like normal - you can start using the TableBuilder and FormBuilder classes with your existing models. You won't be able to use simple field definitions; you will need to define them with more details since you won't have any Streams with that information available. As you dig in - perhaps start a few more discussions for the tasks as they arise.

Cheers!