home-icon
Install into Laravel
Last updated: Dec 04, 2023

Introduction

Combining Laravel and Webigniter is perfect when you want to build a custom website built in Laravel, but you want to provide your users a fast and solid CMS.

Installing Webigniter into your existing Laravel can be done within 2 minutes. In this tutorial we'll show you how to do that.

Before you start, make sure you have created a free Webigniter account, you need it to proceed.

Installation

To install Webigniter into Laravel, just download our Laravel Webigniter client. This is a ZIP file containing only 3 files. You need to unzip the contents in the app folder of your Laravel installation. This will create files named app/Http/Controllers/WebigniterController.php, app/Webigniter/src/WebigniterClient.php, and app/Webigniter/src/Extending/FormsExtend.php.

When these files are in place, you need to specify your license key in order to be able to connect to the CMS. Open the file app/Http/Controllers/WebigniterController.php, find your license key and insert the key in this line.:

$webigniter = new WebigniterClient('YOUR_LICENSE_KEY');

After that, open your routes file (routes/web.php), and add a fallback route to handle all requests which are not specified in the routes file.

Route::any('{fallback}', [\App\Http\Controllers\WebigniterController::class, 'index'])->where('fallback', '.*');

Save the file and you're ready to go. All requests which are not elsewhere specified in the routes file, will be handled through the Webigniter connector, so go ahead and create your first page.

Sidenote

Please note that these documentation pages are based upon usage in plain PHP. Laravel uses blade templates. You can use the examples used on our documentation pages, but you are also free to translate them into their blade equivalents.

Table of Contents
  1. Introduction
  2. Installation
  3. Sidenote
1