Download the PHP package sideapps/laravel-pages without Composer
On this page you can find all versions of the php package sideapps/laravel-pages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sideapps/laravel-pages
More information about sideapps/laravel-pages
Files in sideapps/laravel-pages
Package laravel-pages
Short Description Dynamic & static page class for Laravel Eloquent models
License MIT
Informations about the package laravel-pages
About Laravel Pages
Laravel pages is a package for laravel that allows you to represent your views with a PHP class
This package offers 2 type of class :
- Static (like home page)
- Dynamic (eloquent model)
Works with joedixon/laravel-translation & spatie/laravel-translatable
Installation
or
Usage
Static page
You must be create translation file for your page and set up these attributes (editable in the config or for each class page):
- meta_title
- meta_description
- fil_ariane
- titre_h1
Dynamic page
Your eloquent model must implements Pageable Interface & had these attributes :
- meta_title
- meta_description
- breadcrumb
- title
Global
You now have a $page variable in all your blade views. You can also use it in layout, for example :
Options
no index, no follow
Add this line to your page class
Methods available in views
Get translation :
Get lang attribute :
get meta-title :
get meta-description :
Generate no index meta (generate meta noindex, nofollow if page is noindex) :
Generate alternate links :
Generate switch languages links :
Generate breadcrumb :
Publish config & views files
All versions of laravel-pages with dependencies
joedixon/laravel-translation Version ^1.1
laravel/framework Version ^8.12
spatie/laravel-translatable Version ^4.6