This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Description
I've been running into issues with custom templates. Whether I am relying on naming the controller the same or setting the template property, the controller fails to send data to the view.
However, the standard page controller does send it's data.
Thanks for any help you can provide!
templates/faq.blade.php
{{--
Template Name: Frequently Asked Questions
--}}
@extends('layouts.base')
@section('content')
@while(have_posts()) @php(the_post())
@include('partials.page-header')
@include('partials.content-page')
@endwhile
{{ $faq or 'No $faq variable returned' }}<br/>
{{ $page or 'No $page variable returned' }}
@endsection
controllers/faq.php
<?php
namespace App;
use Sober\Controller\Controller;
class Faq extends Controller
{
/**
* Protected methods will not be passed to the template
*/
protected function hidden()
{
}
public function faq()
{
return 'Testing FAQ Controller';
}
}
controllers/page.php
<?php
namespace App;
use Sober\Controller\Controller;
class Page extends Controller
{
/**
* Protected methods will not be passed to the template
*/
protected function hidden()
{
}
public function page()
{
return 'Testing Page Controller';
}
}
Outputs
No $faq variable returned
Testing Page Controller