@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | */ |
37 | 37 | $capsule = new Capsule; |
38 | 38 | $capsule->addConnection([ |
39 | - 'driver' => 'sqlite', |
|
40 | - 'database' => ':memory:', |
|
39 | + 'driver' => 'sqlite', |
|
40 | + 'database' => ':memory:', |
|
41 | 41 | ]); |
42 | 42 | $capsule->setEventDispatcher(new Dispatcher); |
43 | 43 | $capsule->setAsGlobal(); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | $capsule->schema()->dropIfExists('models'); |
47 | 47 | |
48 | 48 | $capsule->schema()->create('models', function (Blueprint $table) { |
49 | - $table->increments('id'); |
|
50 | - $table->string('string'); |
|
51 | - $table->string('email'); |
|
52 | - $table->timestamps(); |
|
49 | + $table->increments('id'); |
|
50 | + $table->string('string'); |
|
51 | + $table->string('email'); |
|
52 | + $table->timestamps(); |
|
53 | 53 | }); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | | |
17 | 17 | */ |
18 | 18 | |
19 | -require __DIR__ . '/vendor/autoload.php'; |
|
19 | +require __DIR__.'/vendor/autoload.php'; |
|
20 | 20 | |
21 | 21 | /* |
22 | 22 | |-------------------------------------------------------------------------- |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | $capsule->schema()->dropIfExists('models'); |
47 | 47 | |
48 | -$capsule->schema()->create('models', function (Blueprint $table) { |
|
48 | +$capsule->schema()->create('models', function(Blueprint $table) { |
|
49 | 49 | $table->increments('id'); |
50 | 50 | $table->string('string'); |
51 | 51 | $table->string('email'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | m::close(); |
22 | 22 | } |
23 | 23 | |
24 | - public function testItReturnsTheDashboardIfUserIsAuthenticated () |
|
24 | + public function testItReturnsTheDashboardIfUserIsAuthenticated() |
|
25 | 25 | { |
26 | 26 | // $user = factory(App\User::class)->create(); |
27 | 27 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // $this->assertFalse($request); |
34 | 34 | } |
35 | 35 | |
36 | - public function testItRedirectsToLoginIfUserIsNotAuthenticated () |
|
36 | + public function testItRedirectsToLoginIfUserIsNotAuthenticated() |
|
37 | 37 | { |
38 | 38 | //$request = $this->urlGenerator->to('admin')->assertRedirectedTo('login'); |
39 | 39 | $this->assertTrue(true); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('sites', function (Blueprint $table) { |
|
15 | + Schema::create('sites', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('title'); |
18 | 18 | $table->string('twitter'); |
@@ -7,23 +7,23 @@ |
||
7 | 7 | |
8 | 8 | class AuthController extends Controller |
9 | 9 | { |
10 | - public function __construct () { |
|
10 | + public function __construct() { |
|
11 | 11 | $this->middleware('guest'); |
12 | 12 | } |
13 | 13 | |
14 | - public function showLoginForm () { |
|
14 | + public function showLoginForm() { |
|
15 | 15 | return view('Blue::auth.login'); |
16 | 16 | } |
17 | 17 | |
18 | - public function postLoginForm () { |
|
18 | + public function postLoginForm() { |
|
19 | 19 | return 'Posted!'; |
20 | 20 | } |
21 | 21 | |
22 | - public function showRegisterForm () { |
|
22 | + public function showRegisterForm() { |
|
23 | 23 | return view('Blue::auth.register'); |
24 | 24 | } |
25 | 25 | |
26 | - public function postRegisterForm () { |
|
26 | + public function postRegisterForm() { |
|
27 | 27 | return 'Posted!'; |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | class PagesController extends Controller |
13 | 13 | { |
14 | - public function page ($page = null) { |
|
14 | + public function page($page = null) { |
|
15 | 15 | if (is_null($page)) { |
16 | 16 | return SEO::make([], 'Blue::home'); |
17 | 17 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | |
8 | 8 | class AdminController extends Controller |
9 | 9 | { |
10 | - public function __construct () { |
|
10 | + public function __construct() { |
|
11 | 11 | $this->middleware('auth'); |
12 | 12 | } |
13 | 13 | |
14 | - public function index () { |
|
14 | + public function index() { |
|
15 | 15 | return redirect('admin/dashboard'); |
16 | 16 | } |
17 | 17 | |
18 | - public function showDashboard () { |
|
18 | + public function showDashboard() { |
|
19 | 19 | return view('Blue::admin.dashboard'); |
20 | 20 | } |
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('insert_if_exists')) { |
|
4 | - function insert_if_exists ($insert, $template = null, $match = null) { |
|
3 | +if (!function_exists('insert_if_exists')) { |
|
4 | + function insert_if_exists($insert, $template = null, $match = null) { |
|
5 | 5 | if (!is_null($insert)) { // if item exists |
6 | 6 | if (is_array($insert)) { // if more than one item is given |
7 | 7 | $ret = ''; // total of all items to return |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | class SiteController extends Controller |
10 | 10 | { |
11 | - public function showCreateForm () |
|
11 | + public function showCreateForm() |
|
12 | 12 | { |
13 | 13 | return SEO::make([ |
14 | 14 | 'title' => 'New Site', |
@@ -5,14 +5,14 @@ |
||
5 | 5 | |
6 | 6 | Route::group(['namespace' => '\\MeestorHok\\Blue\\Http\\Controllers'], function() |
7 | 7 | { |
8 | - Route::group(['middleware' => SiteDoesntExistMiddleware::class], function () |
|
8 | + Route::group(['middleware' => SiteDoesntExistMiddleware::class], function() |
|
9 | 9 | { // if the user hasn't created a site yet |
10 | 10 | Route::get('new', 'SiteController@showCreateForm'); |
11 | 11 | }); |
12 | 12 | |
13 | - Route::group(['middleware' => SiteExistsMiddleware::class], function () |
|
13 | + Route::group(['middleware' => SiteExistsMiddleware::class], function() |
|
14 | 14 | { // At least one site exists |
15 | - Route::group(['prefix' => 'admin'], function () |
|
15 | + Route::group(['prefix' => 'admin'], function() |
|
16 | 16 | { |
17 | 17 | Route::get('/', 'AdminController@index'); |
18 | 18 | Route::get('dashboard', 'AdminController@showDashboard'); |