mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Nova getting started added
This commit is contained in:
@@ -9,6 +9,8 @@ use Laravel\Nova\Fields\BelongsToMany;
|
||||
|
||||
class Category extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -32,6 +34,11 @@ class Category extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Categories');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -2,46 +2,48 @@
|
||||
|
||||
namespace App\Nova;
|
||||
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
use Laravel\Nova\Fields\BelongsTo;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
|
||||
class City extends Resource
|
||||
{
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public static $model = \App\Models\City::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 $search = [
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Cities');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fields(Request $request)
|
||||
{
|
||||
return [
|
||||
ID::make()->sortable(),
|
||||
ID::make()
|
||||
->sortable(),
|
||||
|
||||
Text::make('Name')
|
||||
->rules('required', 'string'),
|
||||
@@ -56,6 +58,7 @@ class City extends Resource
|
||||
* Get the cards available for the request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function cards(Request $request)
|
||||
@@ -67,6 +70,7 @@ class City extends Resource
|
||||
* Get the filters available for the resource.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function filters(Request $request)
|
||||
@@ -78,6 +82,7 @@ class City extends Resource
|
||||
* Get the lenses available for the resource.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function lenses(Request $request)
|
||||
@@ -89,6 +94,7 @@ class City extends Resource
|
||||
* Get the actions available for the resource.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function actions(Request $request)
|
||||
|
||||
@@ -9,6 +9,8 @@ use Laravel\Nova\Fields\HasMany;
|
||||
|
||||
class Country extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -32,6 +34,11 @@ class Country extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Countries');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -10,6 +10,8 @@ use Laravel\Nova\Fields\BelongsToMany;
|
||||
|
||||
class Course extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -33,6 +35,11 @@ class Course extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Courses');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
|
||||
namespace App\Nova\Dashboards;
|
||||
|
||||
use Laravel\Nova\Cards\Help;
|
||||
use Laravel\Nova\Dashboards\Main as Dashboard;
|
||||
use Nova\Start\Start;
|
||||
|
||||
class Main extends Dashboard
|
||||
{
|
||||
public function name()
|
||||
{
|
||||
return 'Getting Started';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cards for the dashboard.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function cards()
|
||||
{
|
||||
return [
|
||||
new Help,
|
||||
new Start,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ use Laravel\Nova\Fields\BelongsTo;
|
||||
|
||||
class Event extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -32,6 +34,11 @@ class Event extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Events');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -10,6 +10,8 @@ use Laravel\Nova\Fields\BelongsTo;
|
||||
|
||||
class Lecturer extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -33,6 +35,11 @@ class Lecturer extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Lecturers');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,8 @@ use Laravel\Nova\Fields\Text;
|
||||
|
||||
class Participant extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -31,6 +33,11 @@ class Participant extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Participants');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -9,6 +9,8 @@ use Laravel\Nova\Fields\BelongsTo;
|
||||
|
||||
class Registration extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -32,6 +34,11 @@ class Registration extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Registrations');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -8,6 +8,8 @@ use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
|
||||
class Team extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
* @var class-string<\App\Models\Team>
|
||||
|
||||
@@ -12,6 +12,8 @@ use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
|
||||
class User extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
* @var class-string<\App\Models\User>
|
||||
@@ -32,6 +34,11 @@ class User extends Resource
|
||||
'id', 'name', 'email',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Users');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
@@ -9,6 +9,8 @@ use Laravel\Nova\Fields\BelongsTo;
|
||||
|
||||
class Venue extends Resource
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
@@ -32,6 +34,11 @@ class Venue extends Resource
|
||||
'id',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Venues');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user