Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add soberwp/controller #1903

Merged
merged 4 commits into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Sage is a WordPress starter theme with a modern development workflow.
* ES6 for JavaScript
* [Webpack](https://webpack.github.io/) for compiling assets, optimizing images, and concatenating and minifying files
* [Browsersync](http://www.browsersync.io/) for synchronized browser testing
* [Laravel's Blade](https://laravel.com/docs/5.3/blade) as a templating engine
* [Laravel Blade](https://laravel.com/docs/5.3/blade) as a templating engine
* [Controller](https://github.com/soberwp/controller) for passing data to Blade templates
* CSS framework options:
* [Bootstrap 4](http://getbootstrap.com/)
* [Foundation](http://foundation.zurb.com/)
Expand All @@ -22,10 +23,6 @@ Sage is a WordPress starter theme with a modern development workflow.

See a working example at [roots-example-project.com](https://roots-example-project.com/).

### Recommended extensions

* [Controller](https://github.com/soberwp/controller) — WordPress plugin to enable a basic controller when using Blade with Sage 9

## Requirements

Make sure all dependencies have been installed before moving on:
Expand Down Expand Up @@ -75,6 +72,7 @@ themes/your-theme-name/ # → Root of your Sage based theme
│ │ ├── images/ # → Theme images
│ │ ├── scripts/ # → Theme JS
│ │ └── styles/ # → Theme stylesheets
│ ├── controllers/ # → Controller files
│ ├── functions.php # → Composer autoloader, theme includes
│ ├── index.php # → Never manually edit
│ ├── screenshot.png # → Theme screenshot for WP admin
Expand Down Expand Up @@ -108,6 +106,8 @@ Sage 8 documentation is available at [https://roots.io/sage/docs/](https://roots

Sage 9 documentation is currently in progress and can be viewed at [https://github.com/roots/docs/tree/sage-9/sage](https://github.com/roots/docs/tree/sage-9/sage).

Controller documentation is available at [https://github.com/soberwp/controller#usage](https://github.com/soberwp/controller#usage).

## Contributing

Contributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started.
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"php": ">=5.6.4",
"composer/installers": "~1.0",
"illuminate/view": "~5.4.0",
"illuminate/config": "~5.4.0"
"illuminate/config": "~5.4.0",
"soberwp/controller": "dev-master"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.8.0"
Expand Down
226 changes: 224 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added resources/controllers/.gitkeep
Empty file.
10 changes: 10 additions & 0 deletions resources/controllers/About.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Sober\Controller\Controller;

class About extends Controller
{

}
13 changes: 13 additions & 0 deletions resources/controllers/App.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App;

use Sober\Controller\Controller;

class App extends Controller
{
public function siteName()
{
return get_bloginfo('name');
}
}
10 changes: 10 additions & 0 deletions resources/controllers/Home.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Sober\Controller\Controller;

class Home extends Controller
{

}