diff --git a/app/Collection.php b/app/Collection.php index bf4b0d3..9859f1d 100755 --- a/app/Collection.php +++ b/app/Collection.php @@ -8,7 +8,8 @@ class Collection extends Model { //protected $with = []; - public function movies() { + public function movies() + { return $this->hasMany("App\Movie"); } } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index a8c5158..29934ca 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -19,7 +19,8 @@ class Kernel extends ConsoleKernel /** * Define the application's command schedule. * - * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @param \Illuminate\Console\Scheduling\Schedule $schedule + * * @return void */ protected function schedule(Schedule $schedule) diff --git a/app/Credit.php b/app/Credit.php index 86a8ac3..c90b035 100755 --- a/app/Credit.php +++ b/app/Credit.php @@ -6,9 +6,10 @@ class Credit extends Model { - protected $with = ["cast"]; + protected $with = ['cast']; - public function cast() { - return $this->hasMany("App\Person")->where("type", "=", "cast"); + public function cast() + { + return $this->hasMany("App\Person")->where('type', '=', 'cast'); } } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 043cad6..3b97f12 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -29,7 +29,8 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Exception $exception + * @param \Exception $exception + * * @return void */ public function report(Exception $exception) @@ -40,8 +41,9 @@ public function report(Exception $exception) /** * Render an exception into an HTTP response. * - * @param \Illuminate\Http\Request $request - * @param \Exception $exception + * @param \Illuminate\Http\Request $request + * @param \Exception $exception + * * @return \Illuminate\Http\Response */ public function render($request, Exception $exception) diff --git a/app/Genre.php b/app/Genre.php index a1e1d08..0146584 100755 --- a/app/Genre.php +++ b/app/Genre.php @@ -6,9 +6,10 @@ class Genre extends Model { - protected $hidden = ["pivot"]; + protected $hidden = ['pivot']; - public function movies() { + public function movies() + { return $this->hasMany("App\Movie"); } } diff --git a/app/Http/Controllers/API/MovieController.php b/app/Http/Controllers/API/MovieController.php index 1416e70..d51fa38 100755 --- a/app/Http/Controllers/API/MovieController.php +++ b/app/Http/Controllers/API/MovieController.php @@ -2,18 +2,18 @@ namespace App\Http\Controllers\API; +use App\Http\Controllers\Controller; use App\Movie; use Carbon\Carbon; -use Illuminate\Http\Request; use Illuminate\Support\Facades\Input; -use App\Http\Controllers\Controller; class MovieController extends Controller { public function refresh_movies() { - $ids = Input::get("ids"); - $movies = Movie::whereIn("id", $ids)->where("updated_at", ">", Carbon::now()->subDay()); + $ids = Input::get('ids'); + $movies = Movie::whereIn('id', $ids)->where('updated_at', '>', Carbon::now()->subDay()); + return $movies->paginate(250); } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 0e8d66a..5e84f2a 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -2,11 +2,11 @@ namespace App\Http\Controllers\Auth; -use App\User; use App\Http\Controllers\Controller; +use App\User; +use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; -use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller { @@ -43,14 +43,15 @@ public function __construct() /** * Get a validator for an incoming registration request. * - * @param array $data + * @param array $data + * * @return \Illuminate\Contracts\Validation\Validator */ protected function validator(array $data) { return Validator::make($data, [ - 'name' => ['required', 'string', 'max:255'], - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required', 'string', 'min:6', 'confirmed'], ]); } @@ -58,14 +59,15 @@ protected function validator(array $data) /** * Create a new user instance after a valid registration. * - * @param array $data + * @param array $data + * * @return \App\User */ protected function create(array $data) { return User::create([ - 'name' => $data['name'], - 'email' => $data['email'], + 'name' => $data['name'], + 'email' => $data['email'], 'password' => Hash::make($data['password']), ]); } diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 03e02a2..a0a2a8a 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,10 +2,10 @@ namespace App\Http\Controllers; +use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\DispatchesJobs; -use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; +use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index a3d8c48..3a46626 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -51,15 +51,15 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, ]; /** diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index a4be5c5..827e7c3 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -9,12 +9,13 @@ class Authenticate extends Middleware /** * Get the path the user should be redirected to when they are not authenticated. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return string */ protected function redirectTo($request) { - if (! $request->expectsJson()) { + if (!$request->expectsJson()) { return route('login'); } } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index e4cec9c..afe1c26 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -10,9 +10,10 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null $guard + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard + * * @return mixed */ public function handle($request, Closure $next, $guard = null) diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 7daf51f..c661475 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware; -use Illuminate\Http\Request; use Fideloper\Proxy\TrustProxies as Middleware; +use Illuminate\Http\Request; class TrustProxies extends Middleware { diff --git a/app/Keyword.php b/app/Keyword.php index fa38fb3..1c0a372 100755 --- a/app/Keyword.php +++ b/app/Keyword.php @@ -6,9 +6,10 @@ class Keyword extends Model { - protected $hidden = ["pivot"]; + protected $hidden = ['pivot']; - public function movies() { + public function movies() + { return $this->hasMany("App\Movie"); } } diff --git a/app/Movie.php b/app/Movie.php index b4f9f20..3eb9935 100755 --- a/app/Movie.php +++ b/app/Movie.php @@ -4,7 +4,6 @@ use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Input; class Movie extends Model @@ -18,48 +17,62 @@ class Movie extends Model public $timestamps = false; protected $casts = [ - "adult" => "boolean", + 'adult' => 'boolean', ]; - protected $hidden = ["cast", "crew"]; + protected $hidden = ['cast', 'crew']; - protected $appends = ["credits"]; + protected $appends = ['credits']; - protected $with = ["collection", "keywords", "cast", "crew", "trailer", "ratings", "release_dates", "alternative_titles", "translations"]; + protected $with = ['collection', 'keywords', 'cast', 'crew', 'trailer', 'ratings', 'release_dates', 'alternative_titles', 'translations']; public function getCreditsAttribute() { - return ["cast" => $this->cast, "crew" => $this->crew]; + return ['cast' => $this->cast, 'crew' => $this->crew]; } public function scopeDefaultWith() { - return $this->with(["similar", "recommendations"]); + return $this->with(['similar', 'recommendations']); } public function getOverviewAttribute($value) { - $language = Input::get("language"); - if ($language == null || $language == "") return $value; - $iso_639 = str_before($language, "_"); - $iso_3166 = str_after($language, "_"); + $language = Input::get('language'); + if ($language == null || $language == '') { + return $value; + } + $iso_639 = str_before($language, '_'); + $iso_3166 = str_after($language, '_'); $translation = $this->getTranslationMatching($iso_639, $iso_3166); - if ($translation != null && $translation->data != null) return $translation->data->overview; + if ($translation != null && $translation->data != null) { + return $translation->data->overview; + } $translation = $this->getTranslationMatching($iso_639, null); - if ($translation != null && $translation->data != null) return $translation->data->overview; + if ($translation != null && $translation->data != null) { + return $translation->data->overview; + } + return $value; } public function getTitleAttribute($value) { - $language = Input::get("language"); - if ($language == null || $language == "") return $value; - $iso_639 = str_before($language, "_"); - $iso_3166 = str_after($language, "_"); + $language = Input::get('language'); + if ($language == null || $language == '') { + return $value; + } + $iso_639 = str_before($language, '_'); + $iso_3166 = str_after($language, '_'); $translation = $this->getTranslationMatching($iso_639, $iso_3166); - if ($translation != null && $translation->data != null) return $translation->data->title; + if ($translation != null && $translation->data != null) { + return $translation->data->title; + } $translation = $this->getTranslationMatching($iso_639, null); - if ($translation != null && $translation->data != null) return $translation->data->title; + if ($translation != null && $translation->data != null) { + return $translation->data->title; + } + return $value; } @@ -72,140 +85,156 @@ private function getTranslationMatching($iso_639 = null, $iso_3166 = null) } } - public function scopeFilter($query) { - $year_range = Input::get("year"); + public function scopeFilter($query) + { + $year_range = Input::get('year'); if ($year_range != null) { $start_year = 1880; $end_year = null; - if (stripos($year_range, "<>") === false) { + if (stripos($year_range, '<>') === false) { $start_year = $year_range; $end_year = $year_range; } else { - $start_year = explode("<>", $year_range)[0]; - $end_year = explode("<>", $year_range)[1]; + $start_year = explode('<>', $year_range)[0]; + $end_year = explode('<>', $year_range)[1]; } - $query = $query->where("release_date", ">", Carbon::create($start_year-1, 12, 31)); + $query = $query->where('release_date', '>', Carbon::create($start_year - 1, 12, 31)); if ($end_year != null) { - $query = $query->where("release_date", "<", Carbon::create($end_year+1, 1, 1)); + $query = $query->where('release_date', '<', Carbon::create($end_year + 1, 1, 1)); } } - $genres = Input::get("genre"); + $genres = Input::get('genre'); if ($genres != null) { - $ids = explode(",", $genres); - $query->whereHas("genres", function($q) use ($ids){ - $q->whereIn("id", $ids); + $ids = explode(',', $genres); + $query->whereHas('genres', function ($q) use ($ids) { + $q->whereIn('id', $ids); }); } - $query = $this->filter($query, "budget", "budget"); - $query = $this->filter($query, "revenue", "revenue"); - $query = $this->filter($query, "runtime", "runtime"); - $query = $this->filter($query, "popularity", "popularity"); - $adult = Input::get("adult", false); + $query = $this->filter($query, 'budget', 'budget'); + $query = $this->filter($query, 'revenue', 'revenue'); + $query = $this->filter($query, 'runtime', 'runtime'); + $query = $this->filter($query, 'popularity', 'popularity'); + $adult = Input::get('adult', false); if ($adult == false) { - $query = $query->where("adult", "=", 0); + $query = $query->where('adult', '=', 0); } - $certified = (bool)Input::get("certified_fresh", false); + $certified = (bool) Input::get('certified_fresh', false); if ($certified == true) { - $query = $query->whereIn("id", function($query) { - $query->select("movie_id")->from("ratings")->where("certified_fresh", true); + $query = $query->whereIn('id', function ($query) { + $query->select('movie_id')->from('ratings')->where('certified_fresh', true); }); } return $query; } - public function filter($query, $column, $input, $value_transformer = null) { + public function filter($query, $column, $input, $value_transformer = null) + { $value = Input::get($input); if ($value_transformer == null) { - $value_transformer = function($value, $sign) { + $value_transformer = function ($value, $sign) { return $value; }; } if ($value != null) { - if (stripos($value, "<>") === false) { + if (stripos($value, '<>') === false) { //We don't have a range! - $query = $query->where($column, "=", $value_transformer($value, "=")); + $query = $query->where($column, '=', $value_transformer($value, '=')); } else { - $start = explode("<>", $value)[0]; - $end = explode("<>", $value)[1]; - $query = $query->where($column, ">", $value_transformer($start, ">")); - $query = $query->where($column, "<", $value_transformer($end, "<")); + $start = explode('<>', $value)[0]; + $end = explode('<>', $value)[1]; + $query = $query->where($column, '>', $value_transformer($start, '>')); + $query = $query->where($column, '<', $value_transformer($end, '<')); } } return $query; } - public function trailer() { - return $this->hasOne("App\Video")->whereIn("type", ["trailer", "teaser"])->orderByDesc("size"); + public function trailer() + { + return $this->hasOne("App\Video")->whereIn('type', ['trailer', 'teaser'])->orderByDesc('size'); } - public function ratings() { + public function ratings() + { return $this->hasMany("App\Rating"); } - public function genres() { + public function genres() + { return $this->belongsToMany("App\Genre"); } - public function keywords() { - return $this->belongsToMany("App\Keyword", "movie_to_keyword"); + public function keywords() + { + return $this->belongsToMany("App\Keyword", 'movie_to_keyword'); } - public function release_dates() { + public function release_dates() + { return $this->hasMany("App\ReleaseDate"); } - public function alternative_titles() { + public function alternative_titles() + { return $this->hasMany("App\AlternativeTitle"); } - public function cast() { - return $this->belongsToMany("App\Person", "credits")->wherePivot("type", "=", "cast")->withPivot('character', 'order', 'credit_id'); + public function cast() + { + return $this->belongsToMany("App\Person", 'credits')->wherePivot('type', '=', 'cast')->withPivot('character', 'order', 'credit_id'); } - public function crew() { - return $this->belongsToMany("App\Person", "credits")->wherePivot("type", "=", "crew")->withPivot('job', 'department', 'credit_id');; + public function crew() + { + return $this->belongsToMany("App\Person", 'credits')->wherePivot('type', '=', 'crew')->withPivot('job', 'department', 'credit_id'); } - public function similar() { + public function similar() + { return $this->belongsToMany('App\Movie', 'similar', 'movie_id', 'similar_id'); } - public function recommendations() { + public function recommendations() + { return $this->belongsToMany('App\Movie', 'recommendations', 'movie_id', 'recommended_id'); } - public function recommendedFrom() { + public function recommendedFrom() + { return $this->belongsToMany('App\Movie', 'recommendations', 'recommended_id', 'movie_id'); } - public function collection() { + public function collection() + { return $this->belongsTo("App\Collection"); } - public function credits() { + public function credits() + { return $this->hasMany("App\Credit"); } - public function translations() { + public function translations() + { return $this->hasMany("App\Translation"); } public function mappings() { - return $this->hasMany("App\Mapping", "tmdbid", "id"); + return $this->hasMany("App\Mapping", 'tmdbid', 'id'); } - public function createMappingMovie() { - return new MappingMovie(["id" => $this->id, "title" => $this->title, "imdb_id" => $this->imdb_id]); + public function createMappingMovie() + { + return new MappingMovie(['id' => $this->id, 'title' => $this->title, 'imdb_id' => $this->imdb_id]); } } - diff --git a/app/Person.php b/app/Person.php index 72304d9..8efb151 100755 --- a/app/Person.php +++ b/app/Person.php @@ -6,49 +6,50 @@ class Person extends Model { - protected $table = "persons"; + protected $table = 'persons'; - protected $hidden = ["pivot"]; + protected $hidden = ['pivot']; - protected $appends = ["department", "job", "order", "character"]; + protected $appends = ['department', 'job', 'order', 'character']; - public function movies() { - return $this->belongsToMany("App\Movie", "credits")->withPivot('type', 'character', 'order', 'job', 'department', 'credit_id'); + public function movies() + { + return $this->belongsToMany("App\Movie", 'credits')->withPivot('type', 'character', 'order', 'job', 'department', 'credit_id'); } public function getDepartmentAttribute() { - if ($this->pivot == null) - { - return null; + if ($this->pivot == null) { + return; } + return $this->pivot->department; } public function getJobAttribute() { - if ($this->pivot == null) - { - return null; + if ($this->pivot == null) { + return; } + return $this->pivot->job; } public function getOrderAttribute() { - if ($this->pivot == null) - { - return null; + if ($this->pivot == null) { + return; } + return $this->pivot->order; } public function getCharacterAttribute() { - if ($this->pivot == null) - { - return null; + if ($this->pivot == null) { + return; } + return $this->pivot->character; } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 9784b1a..9e68caa 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,7 +2,6 @@ namespace App\Providers; -use Illuminate\Support\Facades\Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; class AuthServiceProvider extends ServiceProvider diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 352cce4..395c518 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -2,8 +2,8 @@ namespace App\Providers; -use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Broadcast; +use Illuminate\Support\ServiceProvider; class BroadcastServiceProvider extends ServiceProvider { diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 6c64e52..723a290 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,10 +2,10 @@ namespace App\Providers; -use Illuminate\Support\Facades\Event; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; +use Illuminate\Support\Facades\Event; class EventServiceProvider extends ServiceProvider { diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 5ea48d3..548e4be 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -2,8 +2,8 @@ namespace App\Providers; -use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; +use Illuminate\Support\Facades\Route; class RouteServiceProvider extends ServiceProvider { diff --git a/app/Translation.php b/app/Translation.php index 4382066..2ab031e 100644 --- a/app/Translation.php +++ b/app/Translation.php @@ -6,7 +6,7 @@ class Translation extends Model { - protected $hidden = ["movie_id"]; + protected $hidden = ['movie_id']; public function getDataAttribute($value) { diff --git a/app/User.php b/app/User.php index faa03c3..5328460 100644 --- a/app/User.php +++ b/app/User.php @@ -2,9 +2,8 @@ namespace App; -use Illuminate\Notifications\Notifiable; -use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; class User extends Authenticatable { diff --git a/config/app.php b/config/app.php index b560f1b..631474c 100644 --- a/config/app.php +++ b/config/app.php @@ -189,39 +189,39 @@ 'aliases' => [ - 'App' => Illuminate\Support\Facades\App::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, + 'App' => Illuminate\Support\Facades\App::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Auth' => Illuminate\Support\Facades\Auth::class, + 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, + 'Bus' => Illuminate\Support\Facades\Bus::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Config' => Illuminate\Support\Facades\Config::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'View' => Illuminate\Support\Facades\View::class, ], diff --git a/config/auth.php b/config/auth.php index 7817501..a9264b4 100644 --- a/config/auth.php +++ b/config/auth.php @@ -14,7 +14,7 @@ */ 'defaults' => [ - 'guard' => 'web', + 'guard' => 'web', 'passwords' => 'users', ], @@ -37,12 +37,12 @@ 'guards' => [ 'web' => [ - 'driver' => 'session', + 'driver' => 'session', 'provider' => 'users', ], 'api' => [ - 'driver' => 'token', + 'driver' => 'token', 'provider' => 'users', ], ], @@ -67,7 +67,7 @@ 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => App\User::class, + 'model' => App\User::class, ], // 'users' => [ @@ -94,8 +94,8 @@ 'passwords' => [ 'users' => [ 'provider' => 'users', - 'table' => 'password_resets', - 'expire' => 60, + 'table' => 'password_resets', + 'expire' => 60, ], ], diff --git a/config/broadcasting.php b/config/broadcasting.php index 3ca45ea..1e0044f 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -31,18 +31,18 @@ 'connections' => [ 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), + 'cluster' => env('PUSHER_APP_CLUSTER'), 'encrypted' => true, ], ], 'redis' => [ - 'driver' => 'redis', + 'driver' => 'redis', 'connection' => 'default', ], diff --git a/config/cache.php b/config/cache.php index 4f0b3c4..c20994d 100644 --- a/config/cache.php +++ b/config/cache.php @@ -41,20 +41,20 @@ ], 'database' => [ - 'driver' => 'database', - 'table' => 'cache', + 'driver' => 'database', + 'table' => 'cache', 'connection' => null, ], 'file' => [ 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), + 'path' => storage_path('framework/cache/data'), ], 'memcached' => [ - 'driver' => 'memcached', + 'driver' => 'memcached', 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ + 'sasl' => [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], @@ -63,15 +63,15 @@ ], 'servers' => [ [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), 'weight' => 100, ], ], ], 'redis' => [ - 'driver' => 'redis', + 'driver' => 'redis', 'connection' => 'cache', ], diff --git a/config/database.php b/config/database.php index 22347a4..6e0d9e8 100644 --- a/config/database.php +++ b/config/database.php @@ -34,51 +34,51 @@ 'connections' => [ 'sqlite' => [ - 'driver' => 'sqlite', - 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', + 'driver' => 'sqlite', + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), ], 'mysql' => [ - 'driver' => 'mysql', - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => '', + 'driver' => 'mysql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', 'prefix_indexes' => true, - 'strict' => true, - 'engine' => null, + 'strict' => true, + 'engine' => null, ], 'pgsql' => [ - 'driver' => 'pgsql', - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', + 'driver' => 'pgsql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', 'prefix_indexes' => true, - 'schema' => 'public', - 'sslmode' => 'prefer', + 'schema' => 'public', + 'sslmode' => 'prefer', ], 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', + 'driver' => 'sqlsrv', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '1433'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', 'prefix_indexes' => true, ], @@ -113,16 +113,16 @@ 'client' => 'predis', 'default' => [ - 'host' => env('REDIS_HOST', '127.0.0.1'), + 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), + 'port' => env('REDIS_PORT', 6379), 'database' => env('REDIS_DB', 0), ], 'cache' => [ - 'host' => env('REDIS_HOST', '127.0.0.1'), + 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), + 'port' => env('REDIS_PORT', 6379), 'database' => env('REDIS_CACHE_DB', 1), ], diff --git a/config/filesystems.php b/config/filesystems.php index 77fa5de..ab75dc2 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -45,23 +45,23 @@ 'local' => [ 'driver' => 'local', - 'root' => storage_path('app'), + 'root' => storage_path('app'), ], 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', ], 's3' => [ 'driver' => 's3', - 'key' => env('AWS_ACCESS_KEY_ID'), + 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), - 'url' => env('AWS_URL'), + 'url' => env('AWS_URL'), ], ], diff --git a/config/hashing.php b/config/hashing.php index 8425770..5b10c09 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -44,9 +44,9 @@ */ 'argon' => [ - 'memory' => 1024, + 'memory' => 1024, 'threads' => 2, - 'time' => 2, + 'time' => 2, ], ]; diff --git a/config/logging.php b/config/logging.php index d09cd7d..a0f9da1 100644 --- a/config/logging.php +++ b/config/logging.php @@ -35,36 +35,36 @@ 'channels' => [ 'stack' => [ - 'driver' => 'stack', - 'channels' => ['daily'], + 'driver' => 'stack', + 'channels' => ['daily'], 'ignore_exceptions' => false, ], 'single' => [ 'driver' => 'single', - 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', ], 'daily' => [ 'driver' => 'daily', - 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', - 'days' => 14, + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + 'days' => 14, ], 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => 'critical', + 'emoji' => ':boom:', + 'level' => 'critical', ], 'papertrail' => [ - 'driver' => 'monolog', - 'level' => 'debug', - 'handler' => SyslogUdpHandler::class, + 'driver' => 'monolog', + 'level' => 'debug', + 'handler' => SyslogUdpHandler::class, 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), @@ -72,22 +72,22 @@ ], 'stderr' => [ - 'driver' => 'monolog', - 'handler' => StreamHandler::class, + 'driver' => 'monolog', + 'handler' => StreamHandler::class, 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ + 'with' => [ 'stream' => 'php://stderr', ], ], 'syslog' => [ 'driver' => 'syslog', - 'level' => 'debug', + 'level' => 'debug', ], 'errorlog' => [ 'driver' => 'errorlog', - 'level' => 'debug', + 'level' => 'debug', ], ], diff --git a/config/mail.php b/config/mail.php index f400645..3e8c8f6 100644 --- a/config/mail.php +++ b/config/mail.php @@ -57,7 +57,7 @@ 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), - 'name' => env('MAIL_FROM_NAME', 'Example'), + 'name' => env('MAIL_FROM_NAME', 'Example'), ], /* diff --git a/config/queue.php b/config/queue.php index c1430b4..addfc0b 100644 --- a/config/queue.php +++ b/config/queue.php @@ -35,34 +35,34 @@ ], 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', 'retry_after' => 90, ], 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', 'retry_after' => 90, ], 'sqs' => [ 'driver' => 'sqs', - 'key' => env('SQS_KEY', 'your-public-key'), + 'key' => env('SQS_KEY', 'your-public-key'), 'secret' => env('SQS_SECRET', 'your-secret-key'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'your-queue-name'), + 'queue' => env('SQS_QUEUE', 'your-queue-name'), 'region' => env('SQS_REGION', 'us-east-1'), ], 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, - 'block_for' => null, + 'block_for' => null, ], ], @@ -80,7 +80,7 @@ 'failed' => [ 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', + 'table' => 'failed_jobs', ], ]; diff --git a/config/services.php b/config/services.php index bb4d2ec..89190fc 100644 --- a/config/services.php +++ b/config/services.php @@ -15,13 +15,13 @@ */ 'mailgun' => [ - 'domain' => env('MAILGUN_DOMAIN'), - 'secret' => env('MAILGUN_SECRET'), + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), ], 'ses' => [ - 'key' => env('SES_KEY'), + 'key' => env('SES_KEY'), 'secret' => env('SES_SECRET'), 'region' => env('SES_REGION', 'us-east-1'), ], @@ -31,11 +31,11 @@ ], 'stripe' => [ - 'model' => App\User::class, - 'key' => env('STRIPE_KEY'), - 'secret' => env('STRIPE_SECRET'), + 'model' => App\User::class, + 'key' => env('STRIPE_KEY'), + 'secret' => env('STRIPE_SECRET'), 'webhook' => [ - 'secret' => env('STRIPE_WEBHOOK_SECRET'), + 'secret' => env('STRIPE_WEBHOOK_SECRET'), 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), ], ], diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 1b62a33..d65cb3a 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,7 +1,7 @@ <?php -use Illuminate\Support\Str; use Faker\Generator as Faker; +use Illuminate\Support\Str; /* |-------------------------------------------------------------------------- @@ -16,10 +16,10 @@ $factory->define(App\User::class, function (Faker $faker) { return [ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, + 'name' => $faker->name, + 'email' => $faker->unique()->safeEmail, 'email_verified_at' => now(), - 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret - 'remember_token' => Str::random(10), + 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret + 'remember_token' => Str::random(10), ]; }); diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 16a6108..b48a61b 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -1,8 +1,8 @@ <?php -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; class CreateUsersTable extends Migration { diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 0d5cb84..0ee0a36 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -1,8 +1,8 @@ <?php -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; class CreatePasswordResetsTable extends Migration { diff --git a/public/index.php b/public/index.php index 4584cbc..2b5641b 100644 --- a/public/index.php +++ b/public/index.php @@ -1,12 +1,10 @@ <?php /** - * Laravel - A PHP Framework For Web Artisans + * Laravel - A PHP Framework For Web Artisans. * - * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ - define('LARAVEL_START', microtime(true)); /* diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index e5506df..6ef1a73 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -13,7 +13,7 @@ | */ - 'failed' => 'These credentials do not match our records.', + 'failed' => 'These credentials do not match our records.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', ]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php index d481411..fcab34b 100644 --- a/resources/lang/en/pagination.php +++ b/resources/lang/en/pagination.php @@ -14,6 +14,6 @@ */ 'previous' => '« Previous', - 'next' => 'Next »', + 'next' => 'Next »', ]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index e5544d2..ffa19ba 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -14,9 +14,9 @@ */ 'password' => 'Passwords must be at least six characters and match the confirmation.', - 'reset' => 'Your password has been reset!', - 'sent' => 'We have e-mailed your password reset link!', - 'token' => 'This password reset token is invalid.', - 'user' => "We can't find a user with that e-mail address.", + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", ]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 8ab929c..6519565 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -13,108 +13,108 @@ | */ - 'accepted' => 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', + 'accepted' => 'The :attribute must be accepted.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ + 'between' => [ 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute must have between :min and :max items.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ 'numeric' => 'The :attribute must be greater than :value.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'string' => 'The :attribute must be greater than :value characters.', + 'array' => 'The :attribute must have more than :value items.', ], 'gte' => [ 'numeric' => 'The :attribute must be greater than or equal :value.', - 'file' => 'The :attribute must be greater than or equal :value kilobytes.', - 'string' => 'The :attribute must be greater than or equal :value characters.', - 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'string' => 'The :attribute must be greater than or equal :value characters.', + 'array' => 'The :attribute must have :value items or more.', ], - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'lt' => [ + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lt' => [ 'numeric' => 'The :attribute must be less than :value.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'string' => 'The :attribute must be less than :value characters.', + 'array' => 'The :attribute must have less than :value items.', ], 'lte' => [ 'numeric' => 'The :attribute must be less than or equal :value.', - 'file' => 'The :attribute must be less than or equal :value kilobytes.', - 'string' => 'The :attribute must be less than or equal :value characters.', - 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'string' => 'The :attribute must be less than or equal :value characters.', + 'array' => 'The :attribute must not have more than :value items.', ], 'max' => [ 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'string' => 'The :attribute may not be greater than :max characters.', + 'array' => 'The :attribute may not have more than :max items.', ], - 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ + 'min' => [ 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute must have at least :min items.', ], - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values are present.', - 'required_without' => 'The :attribute field is required when :values is not present.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ + 'same' => 'The :attribute and :other must match.', + 'size' => [ 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', + 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute must contain :size items.', ], 'starts_with' => 'The :attribute must start with one of the following: :values', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', - 'uuid' => 'The :attribute must be a valid UUID.', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute format is invalid.', + 'uuid' => 'The :attribute must be a valid UUID.', /* |-------------------------------------------------------------------------- diff --git a/routes/api.php b/routes/api.php index 2ae9bb7..e9d744f 100644 --- a/routes/api.php +++ b/routes/api.php @@ -17,16 +17,16 @@ return $request->user(); }); -Route::get("/movie/{id}", "API\MovieController@index"); +Route::get('/movie/{id}', "API\MovieController@index"); -Route::get("/collection/{id}", function($id) { - return \App\Collection::with(["movies"])->findOrFail($id); +Route::get('/collection/{id}', function ($id) { + return \App\Collection::with(['movies'])->findOrFail($id); }); -Route::get("/collection/{id}/movies", function($id) { - return \App\Collection::with(["movies"])->findOrFail($id)->movies; +Route::get('/collection/{id}/movies', function ($id) { + return \App\Collection::with(['movies'])->findOrFail($id)->movies; }); -Route::get("/movies", function() { - return \App\Movie::select()->filter()->orderBy("popularity", "DESC")->paginate(25); -}); \ No newline at end of file +Route::get('/movies', function () { + return \App\Movie::select()->filter()->orderBy('popularity', 'DESC')->paginate(25); +}); diff --git a/routes/web.php b/routes/web.php index 4faef9e..4db131c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,12 +11,12 @@ | */ -Route::group(["domain" => "metadata.{test}.{tld}"], function() { +Route::group(['domain' => 'metadata.{test}.{tld}'], function () { Route::get('/', function () { - return view("app"); + return view('app'); }); }); Route::get('/', function () { return view('app'); -}); \ No newline at end of file +}); diff --git a/server.php b/server.php index 5fb6379..20bc389 100644 --- a/server.php +++ b/server.php @@ -1,12 +1,10 @@ <?php /** - * Laravel - A PHP Framework For Web Artisans + * Laravel - A PHP Framework For Web Artisans. * - * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ - $uri = urldecode( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ); diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index f31e495..8fbf370 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -3,7 +3,6 @@ namespace Tests\Feature; use Tests\TestCase; -use Illuminate\Foundation\Testing\RefreshDatabase; class ExampleTest extends TestCase { diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index e9fe19c..06ece2c 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -3,7 +3,6 @@ namespace Tests\Unit; use Tests\TestCase; -use Illuminate\Foundation\Testing\RefreshDatabase; class ExampleTest extends TestCase {