Completed
Push — master ( 8b5998...7d7753 )
by Martin
03:00
created
database/migrations/2015_04_12_000000_create_urls_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('urls', function (Blueprint $table) {
15
+        Schema::create('urls', function(Blueprint $table) {
16 16
             $table->string('uri')->primary();
17 17
             $table->string('redirects_to')->nullable()->index();
18 18
             // Nullable morphs_to resource
Please login to merge, or discard this patch.
src/UrlServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@
 block discarded – undo
10 10
     public function boot()
11 11
     {
12 12
         $this->publishes([
13
-            __DIR__ . '/../database/migrations/' => database_path('migrations')
13
+            __DIR__.'/../database/migrations/' => database_path('migrations')
14 14
         ], 'migrations');
15 15
     }
16 16
     
17 17
     public function register()
18 18
     {
19
-        $this->app['events']->listen('eloquent.saved*', function ($model) {
19
+        $this->app['events']->listen('eloquent.saved*', function($model) {
20 20
             if ($model instanceof HasUrlInterface) {
21 21
                 $model->saveUri();
22 22
             }
23 23
         });
24 24
         
25
-        $this->app['events']->listen('eloquent.deleted*', function ($model) {
25
+        $this->app['events']->listen('eloquent.deleted*', function($model) {
26 26
             if ($model instanceof HasUrlInterface && $model->url) {
27 27
                 $model->url->delete();
28 28
             }
Please login to merge, or discard this patch.
src/Models/Url.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
     protected static function boot()
22 22
     {
23 23
         parent::boot();
24
-        static::creating(function (Url $url) {
24
+        static::creating(function(Url $url) {
25 25
             $url->created_at = Carbon::now();
26 26
         });
27
-        static::deleting(function (Url $url) {
27
+        static::deleting(function(Url $url) {
28 28
             if ($url->redirectedToBy) {
29
-                $url->redirectedToBy->each(function (Url $url) {
29
+                $url->redirectedToBy->each(function(Url $url) {
30 30
                     $url->delete();
31 31
                 });
32 32
             }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     
62 62
     public function getUrlAttribute()
63 63
     {
64
-        return '/' . $this->uri;
64
+        return '/'.$this->uri;
65 65
     }
66 66
 
67 67
     public function __toString()
Please login to merge, or discard this patch.