Package Data | |
---|---|
Maintainer Username: | dmyers |
Maintainer Contact: | arcticpro@gmail.com (Derek Myers) |
Package Create Date: | 2014-02-11 |
Package Last Update: | 2021-11-07 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-04-25 15:04:38 |
Package Statistics | |
---|---|
Total Downloads: | 754 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 13 |
Total Watchers: | 5 |
Total Forks: | 2 |
Total Open Issues: | 0 |
Pages is a static page system for Laravel 5 applications.
Add this to you composer.json file, in the require object:
"dmyers/laravel-pages": "dev-master"
After that, run composer install to install Pages.
Add the service provider to app/config/app.php
, within the providers
array.
'providers' => [
// ...
Dmyers\Pages\PagesServiceProvider::class,
]
Add a class alias to app/config/app.php
, within the aliases
array.
'aliases' => [
// ...
'Pages' => Dmyers\Pages\Facade::class,
]
Use the 1.0
branch or the v1.*
tags for Laravel 4 support.
Publish the default config file to your application so you can make modifications.
$ php artisan vendor:publish
To add a page, create a view in your app directory at views/pages/
and the URL will map to the path. You can nest folders and they will be included in the URL.
In your views there is a helper you can use to link to pages:
page_url('about');
Or if you just want the path to the page:
page_path('about');