Download the PHP package shazzoo/content-studio-laravel without Composer

On this page you can find all versions of the php package shazzoo/content-studio-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package content-studio-laravel

Content Studio for Laravel

Shows the blog articles from the Content Studio Strategy Engine on a plain Laravel site. The package syncs the articles into your database every 15 minutes and serves an overview page and an article page.

Installation

The images from the Engine are stored on the public disk, so the site needs the storage symlink. Most Laravel projects already have it; if yours doesn't:

The publish command copies the tracking script to public/vendor/content-studio/tracking.js. Without it the article pages ask for a file that isn't there and nothing is tracked.

Keeping the script up to date

The script is published under the laravel-assets tag as well, which the default Laravel skeleton republishes on every composer update:

That covers composer update, but not composer install, and not a project whose composer.json lacks that script. To be sure, add this to your deploy:

A site that serves the file itself, through its own build or a CDN, can point the config at that URL instead and skip publishing:

Add the settings to .env:

After storing an article, the sync reports it to the Engine as published, which takes it out of the Engine's approved list. Turn that off on a site that syncs the real project without being the live site, such as local or staging:

The sync runs through the Laravel scheduler, so make sure php artisan schedule:run runs every minute. To sync right away:

To delete every synced article, for example to re-sync from scratch:

Without --images the images stay in storage, so a following --status=all sync does not download them again.

An article whose images cannot be downloaded is not stored at all, so the site never shows a half-finished article; an article that is already live keeps the version it has. The command exits with an error, the article stays unconfirmed in the Engine's approved list, and the next sync downloads the images again. Images that did come through stay on disk, so a retry only fetches what is missing.

Routes

URL Name
/{route} content-studio.index
/{route}/{slug} content-studio.show
/{route}/sitemap.xml content-studio.sitemap

Set CONTENT_STUDIO_ROUTES=false to register the blog routes yourself; see Multiple languages.

Add the sitemap to your robots.txt or your own sitemap index:

Latest articles on other pages

Without a title the heading and the "All articles" link are left out. The component renders nothing when there are no articles.

Using your own layout

By default the pages use a bare layout from the package. To render the blog inside your site, publish the config and point layout at your own layout:

Your layout needs @yield('content'), and @stack('head') inside <head> for the title, meta description, Open Graph tags and JSON-LD.

Multiple languages

The blog is single language out of the box: it shows the articles in the main language of the Engine project, on the routes of the package. The sync always stores every language the Engine returns, so switching this on later needs no re-sync.

A site with multiple languages keeps its own way of working: its own routes, its own locale detection, its own URLs. The package asks the site for those three things instead of deciding them.

1. Register the routes yourself

The package then registers no blog routes, only the tracking script. Put the controller wherever it belongs, for example inside your own locale group:

The article route must have a parameter named slug; every other parameter is yours. Add your own middleware, a translated prefix or a subdomain as you like.

2. Say which language to show

The overview, the article page, the sitemap and the latest-articles component all use this. The locale also becomes the app locale, so the package translations follow along. Default: the main language of the Engine project.

3. Say what the URLs look like

Every link in the views runs through these, so the cards, the previous/next links, the breadcrumbs, the canonical URL and the sitemap all follow your routes. Default: /{route}/{slug} and /{route}.

Translations of an article

Each language is its own record with its own slug, linked by the article id from the Engine. translations() finds the others, which is what you need for a language switcher or hreflang tags:

What stays yours

Styling

The views use Tailwind CSS (v4) with neutral default styling and dark: variants. Tailwind only generates classes from files it scans, so add the package views to your CSS entry file:

The bundled layout loads resources/css/app.css through Vite when a build or dev server is present. Every element also has a cs-* class to hook your own CSS onto. To change the markup itself, publish the views:

Dark mode: the views ship dark: variants, so a site that is always light and leaves Tailwind on its default strategy gets a dark blog whenever the visitor's system is dark. Switch Tailwind to the class-based variant to prevent that:

Tests


All versions of content-studio-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shazzoo/content-studio-laravel contains the following files

Loading the files please wait ...