Skip to content

Commit

Permalink
Doing a little cleanup. (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
weerd authored Apr 7, 2018
1 parent bc038e2 commit e5ae947
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,20 @@


## Introduction

Apollo Pages is a package for Laravel 5 that provides scaffolding and functionality for generating static pages in a CMS-like nature.



## Installation

### Step 1: Composer

From the command line, run:

```shell
composer require weerd/apollo-pages
$ composer require weerd/apollo-pages
```

### Step 2: Service Provider

Within your Laravel project, open `config/app.php` and, at the end of the `providers` array, append:

```php
Expand All @@ -46,19 +43,17 @@ Within your Laravel project, open `config/app.php` and, at the end of the `provi
This will bootstrap the package into Laravel. To have `ApolloPages` work correctly and behave as a catch all for routes specifiying custom pages, the routes for the package need to be considered _after_ the main application routes defined in `/routes/web.php`. For this behavior, the `ApolloPagesServiceProvider` needs to be defined at the very end of the `providers` array.

### Step 3: Migrate

Next, run the migration to add the `pages` table to your database:

```shell
php artisan migrate
$ php artisan migrate
```



## Customization

### Publish Vendor Files

The `ApolloPages` package makes use of the `artisan publish` command to allow user's to publish some of this package's files to their project so that they can easily be overridden and customized by the package user.

You can publish all available publishable package files to your project by running:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"authors": [
{
"name": "Diego Lorenzo",
"email": "[email protected]"
"email": "[email protected]",
"homepage": "http://diegolorenzo.com"
}
],
"require": {
Expand Down
10 changes: 5 additions & 5 deletions src/Http/Controllers/Admin/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ public function store(Request $request)
]);

$page = Page::create([
'slug' => $request->input('slug'),
'path' => $request->input('path'),
'parent_id' => $request->input('parent_id'),
'tier' => $request->input('tier'),
'title' => $request->input('title'),
'body' => $request->input('body'),
'body_markup' => $this->parsedown->text(
strip_tags($request->input('body'))
),
'parent_id' => $request->input('parent_id'),
'path' => $request->input('path'),
'slug' => $request->input('slug'),
'tier' => $request->input('tier'),
'title' => $request->input('title'),
]);

return redirect()->route('admin.pages.index');
Expand Down

0 comments on commit e5ae947

Please sign in to comment.