Permalink
Browse files

Changing the middleware to use the ::class method

  • Loading branch information...
awjudd committed Jul 25, 2016
1 parent fb40f90 commit fe82afd41bb125885a968a342ec56bed9cf67711
Showing with 5 additions and 4 deletions.
  1. +5 −4 Example/Controllers/BlogController.txt
@@ -1,10 +1,11 @@
<?php namespace {{namespace}};

use jorenvanhocht\Blogify\Models\Category;
use jorenvanhocht\Blogify\Models\Post;
use jorenvanhocht\Blogify\Models\Tag;
use Carbon\Carbon;
use jorenvanhocht\Blogify\Models\Tag;
use jorenvanhocht\Blogify\Models\Post;
use Illuminate\Database\DatabaseManager;
use jorenvanhocht\Blogify\Models\Category;
use jorenvanhocht\Blogify\Middleware\ProtectedPost;

class BlogController extends Controller
{
@@ -47,7 +48,7 @@ class BlogController extends Controller
$this->db = $db;
$this->config = objectify(config('blogify'));

$this->middleware('jorenvanhocht\Blogify\Middleware\ProtectedPost', ['only' => 'show']);
$this->middleware(ProtectedPost::class, ['only' => 'show']);
}

///////////////////////////////////////////////////////////////////////////

0 comments on commit fe82afd

Please sign in to comment.