A Frankenstein's monster: Kirby inside of Laravel.

Overview

A Kirby-Laravel Starter Kit

This is an experimental starter kit for using Kirby within Laravel (a little like Statamic). In my limited experience it runs smoothly, but please be ready for some weird bugs.

Implementation

The implementation is fairly simple: anything Laravel doesn't want, pass to Kirby.

  • Kirby is imported as a submodule in cms/kirby - you can checkout any Kirby version you like.
  • Kirby\Cms\App is bootstrapped in bootstrap/app.php.
  • All routes that are not caught by Laravel are rendered by Kirby. See routes/web.php.
  • Kirby-specific URLs are excluded from the CSRF middleware. See app/Http/Middleware/VerifyCsrfToken.php.

Folder Structure/Kirby Roots

You can change the folder structure in bootstrap/app.php, but I have set an opinionated default.

  • Accounts: cms/accounts
  • Blueprints: resources/blueprints
  • Config: config/kirby
  • Content: content
  • Kirby’s source: cms/kirby
  • Logs: storage/logs/kirby
  • Media: public/media
  • Plugins: cms/plugins
  • Site: cms/site
  • Templates: resources/views/templates
  • Sessions: storage/kirby/sessions
  • Snippets: resources/views/snippets

Blade Templating

There is a simple plugin that allows you to use .blade.php files for Kirby templates and snippets. These files should be put in their respective directories within resources/views.

Weirdness

  • If Kirby's helpers are imported normally within Composer, they cannot override Laravel's global helpers. This causes a few errors. To combat this I've used funkjedi/composer-include-files which autoloads files before anything else.
  • Laravel seems to use the global e() helper for views, so overriding this with Kirby's e() causes problems. As a hack-y workaround, I import app/helpers.php, which defines e() as Laravel's implentation, before loading the Kirby helpers... I know.
You might also like...
Kirby 3 Plugin for running jobs like cleaning the cache from within the Panel, PHP code, CLI or a cronjob

Kirby 3 Janitor Kirby 3 Plugin for running jobs. It is a Panel Button! It has jobs build-in for cleaning the cache, sessions, create zip-backup, pre-g

A simple wrapper around vlucas' PHP dotenv library for Kirby CMS.

kirby-phpdotenv A simple wrapper around vlucas' PHP dotenv library for Kirby CMS. Why? I've been using .env in my Kirby projects for a while, but I go

Mirror Laravel model inside Firestore collection.

Laravel Firestore Mirror This package can be used to store copy of Laravel model inside Firestore collection. Installation Install package: composer r

🖍 Write beautiful blog articles using Markdown inside your Laravel app.

Blogged Write beautiful blog articles using Markdown inside your Laravel app. Blogged 🖍 Blogged is a carefully designed Laravel package provides an e

Library for check dependency between modules inside projects

PHP Dependency analyzer PHP DA is tool for check and support dependencies inside your project clear. For example: You have project with 3 root namespa

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Imposter Plugin Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins. Built with ♥ by Typ

run user analytics within your system and track user data inside your database.

WP Local Analytics plugin. run user analytics within your system and track user data inside your database. Installing Go to the plugin page from the W

Manage your Sanctum tokens inside of Filament. ✨

:package_description This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. Installation You can i

WP Local Analytics plugin. - run user analytics within your system and track user data inside your database.

WP Local Analytics plugin. - run user analytics within your system and track user data inside your database.

Owner
Brandon Turner
Medical Student, UCL. Biomedical Science graduate, King's College London.
Brandon Turner
This Kirby V3 Plugin brings snippets and blueprints together in one place. It includes useful tools that completely changing the way you work with Kirby: Fast and well organized.

Kirby Components Overview Do you love to make awesome projects with Kirby CMS? Do you also find it difficult to switch between snippets and blueprints

Roman Gsponer 6 May 31, 2023
Kirby Janitor job for staging

Simple staging Janitor jobs Plugin for very simple staging setup for https://github.com/bnomei/kirby3-janitor/ (required). Beta quality - use at your

Florian Karsten 8 Nov 27, 2022
This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides.

Kirby 3 Many To Many Field This plugin allows you to create many-to-many relationships between pages in Kirby.

Jonas Holfeld 41 Nov 19, 2022
Color-managed thumbnails for Kirby 3

ImageKit for Kirby 3 This is not directly related for ImageKit for Kirby 2, but based on the same idea of improving Kirby’s built-in image processing

Fabian Michael 13 Nov 21, 2022
Helper to automatically load various Kirby extensions in a plugin

Autoloader for Kirby Helper to automatically load various Kirby extensions in a plugin Commerical Usage This package is free but if you use it in a co

Bruno Meilick 13 Nov 9, 2022
Add information about PGP public keys on upload in Kirby v3

Kirby3 GnuPG This plugin adds information about PGP public keys on upload, using gpg binary (which needs to be installed for this to work). Getting st

Fundevogel 2 Oct 11, 2021
Kirby wrapper for automated content accessibility checkers Editoria11y and Sa11y

Kirby3 A11yprompter For a comprehensive overview of Sa11y and Editoria11y, how they can assist maintaining an accessible website by supporting content

Sebastian Greger 8 Apr 25, 2022
Plugin for Kirby that allows you to load assets generated by Vite.

Kirby Vite Plugin Plugin for Kirby that allows you to load assets generated by Vite. In development mode, assets are loaded from Vite's development se

Oblik Studio 10 Nov 20, 2022
🦭 Kirby, but headless only – KQL with bearer token, Express-esque middlewares & more

Kirby Headless Starter ℹ️ Send a Bearer test authorization header with a request to the live playground to test this headless starter. This starter ki

Johann Schopplich 36 Dec 28, 2022
Kirby plugin to visually show hidden characters in all kind of input fields and their previews.

Kirby Hidden Characters Kirby plugin to visually show hidden characters in all kind of input fields and their previews. This includes white spaces and

Jakob Grommas 21 Oct 17, 2022