-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Laravel Nova as admin interface (#930)
- Loading branch information
Showing
118 changed files
with
4,032 additions
and
1,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Constants; | ||
|
||
class LTIGradeMode | ||
{ | ||
// how the LMS should handle grades for a chime | ||
const NO_GRADES = "no_grades"; | ||
const ONE_GRADE = "one_grade"; | ||
const MULTIPLE_GRADES = "multiple_grades"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace App\Constants; | ||
|
||
class LTIGradeOptions | ||
{ | ||
public const FULL_CREDIT_FOR_INCORRECT = 0; | ||
|
||
public const NO_CREDIT_FOR_INCORRECT = 1; | ||
|
||
public const HALF_CREDIT_FOR_INCORRECT = 2; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
|
||
namespace App\Nova; | ||
|
||
use Laravel\Nova\Fields\BelongsTo; | ||
use Laravel\Nova\Fields\DateTime; | ||
use Laravel\Nova\Fields\ID; | ||
use Laravel\Nova\Fields\Text; | ||
use Laravel\Nova\Http\Requests\NovaRequest; | ||
use Laravel\Nova\Query\Search\SearchableMorphToRelation; | ||
use Yadahan\AuthenticationLog\AuthenticationLog as AuthenticationLogModel; | ||
|
||
class AuthenticationLog extends Resource | ||
{ | ||
/** | ||
* The model the resource corresponds to. | ||
*/ | ||
public static $model = AuthenticationLogModel::class; | ||
|
||
/** | ||
* The single value that should be used to represent the resource when being displayed. | ||
* | ||
* @var string | ||
*/ | ||
public static $title = 'id'; | ||
|
||
/** | ||
* The columns that should be searched. | ||
* | ||
* @var array | ||
*/ | ||
public static function searchableColumns() | ||
{ | ||
return [ | ||
'id', | ||
'ip_address', | ||
new SearchableMorphToRelation('authenticatable', 'name', [User::class]), | ||
]; | ||
} | ||
|
||
/** | ||
* Get the fields displayed by the resource. | ||
* | ||
* @return array | ||
*/ | ||
public function fields(NovaRequest $request) | ||
{ | ||
return [ | ||
ID::make()->sortable(), | ||
BelongsTo::make('User', 'authenticatable', User::class)->sortable()->filterable(), | ||
DateTime::make('Login At', 'login_at')->sortable()->filterable(), | ||
Text::make('IP Address', 'ip_address')->filterable(), | ||
Text::make('User Agent', 'user_agent'), | ||
]; | ||
} | ||
|
||
/** | ||
* Get the cards available for the request. | ||
* | ||
* @return array | ||
*/ | ||
public function cards(NovaRequest $request) | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* Get the filters available for the resource. | ||
* | ||
* @return array | ||
*/ | ||
public function filters(NovaRequest $request) | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* Get the lenses available for the resource. | ||
* | ||
* @return array | ||
*/ | ||
public function lenses(NovaRequest $request) | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* Get the actions available for the resource. | ||
* | ||
* @return array | ||
*/ | ||
public function actions(NovaRequest $request) | ||
{ | ||
return []; | ||
} | ||
} |
Oops, something went wrong.