3brettb / fantasynfl
Laravel NFL Fantasy Football Resource
0.1
2018-01-23 23:37 UTC
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: 6.3.0
- laravel/framework: 5.5.*
Requires (Dev)
- phpunit/phpunit: 6.4.4
- symfony/debug: v3.4.1
This package is not auto-updated.
Last update: 2024-12-22 04:32:38 UTC
README
Laravel NFL Fantasy Football
Installation
Create new Laravel Web App composer require laravel/laravel
Install Laravel Auth php artisan make:auth
Remove the user table migration from database/migrations
run composer require 3brettb/fantasynfl
Change App\User class to extend FantasyNFL\Fantasy\Models\User
run php artisan vendor:publish
run php artisan migrate
Add an authenticated()
method to LoginController
/** * Perform Fantasy NFL Login actions * * @param Request $request * @param $user */ public function authenticated(Request $request, $user) { FantasyNFL::login($user); }
FantasyNFL Documentation
Get Team Roster
FantasyNFL::roster($team_id);
Get League
FantasyNFL::find($league_id);
Get League Activity
$league->activity()
Get Entities involved with Activity
$activity->involved[0]->get()
Get Link <a> tag
associated with activity
$activity->links[0]->a_tag();
Get League Divisions
$league->divisions() // -- or -- $league->division($division_id)
Get Division Teams
$division->teams()
Get Week
$league->week() // to get current week $league->week($week_number) // to get specific week of current season $league->week($week_number, $year) // returns week of the given season and number
Get Season
$league->season() // to get current season $league->season($year) // to get specific season by year