PHP code example of ryancco / laravel-pages

1. Go to this page and download the library: Download ryancco/laravel-pages library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ryancco / laravel-pages example snippets


[
// ...
    'middleware' => [
         'web'
    ]
// ...
];

// continue to work as expected 👍
redirect()->to('/pages/about_us');
redirect()->to(url('pages/about_us'));

// both work - regardless of your configured prefix 👌
redirect()->to(page('pages/about_us'));
redirect()->to(page('pages.about_us'));

// also available via the Pages facade 🤝
redirect()->to(Pages::url('pages/about_us'));
redirect()->to(Pages::url('pages.about_us'));
bash
php artisan vendor:publish --provider="Ryancco\Pages\PagesServiceProvider"