- Help centre
- Getting started
- How do I connect a Laravel site?
How do I connect a Laravel site?
Short answerDownload the Laravel connector from SEOmise, add its files, routes and service provider to your app, then pair it with one artisan command using a one-time code from SEOmise.
The Laravel connector is a set of PHP files you add to your app. It publishes the changes you approve, adds the visitor tracker, checks in with SEOmise and updates itself. Setting it up needs someone who can change your app's code and run commands on its server.
Steps
- Download it. In set-up choose Detect my platform (or Choose my platform → Laravel), then Download for Laravel. It is also under Settings → Install guide → Laravel. The zip holds the files, a README with full instructions, and your SEOmise address and key.
- Add the files. Copy the
Seomise*.phpfiles toapp/Seomise/and the migrations todatabase/migrations/, then runphp artisan migrate. It needs PHP's sodium extension. - Configure it. Add the
seomise_connectorblock toconfig/services.phpand the two routes toroutes/api.php, as the Install guide shows. - Register it. Add
App\Seomise\SeomiseServiceProvider::classtobootstrap/providers.php(on Laravel 10, toconfig/app.php). - Tell it about your pages. Write your own
SeomiseSiteclass (your pages, their titles and descriptions, and their editable HTML) and bind it, as the README shows. - Schedule it. Schedule
seomise:checkintwice a day and run Laravel's scheduler every minute. The scheduler also sends the five-minute health pulse. - Pair it. Press Create my pairing code. SEOmise shows a command like
php artisan seomise:pairfollowed by your SEOmise address and the code. Run it on your server. The code works once and the screen shows when it expires. The page moves on by itself when your site checks in.
Options
- What SEOmise may change: the
scopeslist in the config. Leave it out to allow everything except publishing pages. - Images, new pages and blog posts: implement the optional
SeomiseMedia,SeomisePagesandSeomisePostsparts if you want SEOmise to use your images, create pages or write posts. They are only offered when you implement them. - Updates: automatic unless you set
SEOMISE_UPDATES=manual; then runphp artisan seomise:updateyourself.
Other ways
A Laravel site can also use the PHP connector file, or the one line of code for visitors only.
Not what you needed? Ask Mise or contact support.
Still stuck?
Ask Mise, or a person
Mise answers from these help articles in seconds. If the answer is not here, raise a ticket and our support team replies by e-mail.