Skip to content

Commit

Permalink
Merge pull request #1903 from roots/add-controller
Browse files Browse the repository at this point in the history
Add soberwp/controller
  • Loading branch information
retlehs authored Jun 23, 2017
2 parents f5a31c3 + aced09f commit 8172de6
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 8 deletions.
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 @@ -23,10 +24,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 @@ -76,6 +73,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 @@ -109,6 +107,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
{

}

0 comments on commit 8172de6

Please sign in to comment.