Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php namespace Arcanedev\LaravelSeo\Models; |
||
69 | 6 | public static function createOne($oldUrl, $newUrl, $status = Response::HTTP_MOVED_PERMANENTLY) |
|
70 | { |
||
71 | 6 | $redirect = new self([ |
|
72 | 6 | 'old_url' => $oldUrl, |
|
73 | 6 | 'new_url' => $newUrl, |
|
74 | 6 | 'status' => $status, |
|
75 | 2 | ]); |
|
76 | |||
77 | 6 | $redirect->save(); |
|
78 | |||
79 | 6 | return $redirect; |
|
80 | } |
||
81 | } |
||
82 |