guarded instead of fillable

This commit is contained in:
Benjamin Takats
2022-12-01 16:01:24 +01:00
parent 37695943ef
commit e3af9cf67d
37 changed files with 120 additions and 197 deletions

View File

@@ -8,16 +8,16 @@ created:
- database/factories/VenueFactory.php - database/factories/VenueFactory.php
- database/factories/EventFactory.php - database/factories/EventFactory.php
- database/factories/RegistrationFactory.php - database/factories/RegistrationFactory.php
- database/migrations/2022_12_01_100450_create_countries_table.php - database/migrations/2022_12_01_145948_create_countries_table.php
- database/migrations/2022_12_01_100451_create_cities_table.php - database/migrations/2022_12_01_145949_create_cities_table.php
- database/migrations/2022_12_01_100452_create_lecturers_table.php - database/migrations/2022_12_01_145950_create_lecturers_table.php
- database/migrations/2022_12_01_100453_create_participants_table.php - database/migrations/2022_12_01_145951_create_participants_table.php
- database/migrations/2022_12_01_100454_create_categories_table.php - database/migrations/2022_12_01_145952_create_categories_table.php
- database/migrations/2022_12_01_100455_create_courses_table.php - database/migrations/2022_12_01_145953_create_courses_table.php
- database/migrations/2022_12_01_100456_create_venues_table.php - database/migrations/2022_12_01_145954_create_venues_table.php
- database/migrations/2022_12_01_100457_create_events_table.php - database/migrations/2022_12_01_145955_create_events_table.php
- database/migrations/2022_12_01_100458_create_registrations_table.php - database/migrations/2022_12_01_145956_create_registrations_table.php
- database/migrations/2022_12_01_100459_create_category_course_table.php - database/migrations/2022_12_01_145957_create_category_course_table.php
- app/Models/Country.php - app/Models/Country.php
- app/Models/City.php - app/Models/City.php
- app/Models/Lecturer.php - app/Models/Lecturer.php
@@ -40,9 +40,9 @@ models:
Membership: { team_id: biginteger, user_id: biginteger, role: 'string nullable' } Membership: { team_id: biginteger, user_id: biginteger, role: 'string nullable' }
Team: { user_id: biginteger, name: string, personal_team: boolean } Team: { user_id: biginteger, name: string, personal_team: boolean }
TeamInvitation: { team_id: biginteger, email: string, role: 'string nullable' } TeamInvitation: { team_id: biginteger, email: string, role: 'string nullable' }
User: { name: string, email: string, email_verified_at: 'datetime nullable', password: string, remember_token: 'string:100 nullable', current_team_id: 'biginteger nullable', profile_photo_path: 'string:2048 nullable', two_factor_secret: 'text nullable', two_factor_recovery_codes: 'text nullable', two_factor_confirmed_at: 'datetime nullable' } User: { name: string, email: string, email_verified_at: 'datetime nullable', password: string, remember_token: 'string:100 nullable', current_team_id: 'biginteger nullable', profile_photo_path: 'string:2048 nullable', is_lecturer: 'boolean default:', two_factor_secret: 'text nullable', two_factor_recovery_codes: 'text nullable', two_factor_confirmed_at: 'datetime nullable' }
Country: { name: string, code: string, relationships: { hasMany: City } } Country: { name: string, code: string, relationships: { hasMany: City } }
City: { country_id: 'id foreign', name: string } City: { country_id: 'id foreign', name: string, slug: 'string unique' }
Lecturer: { team_id: 'id foreign', name: string, slug: 'string unique', active: 'boolean default:true' } Lecturer: { team_id: 'id foreign', name: string, slug: 'string unique', active: 'boolean default:true' }
Participant: { first_name: string, last_name: string } Participant: { first_name: string, last_name: string }
Category: { name: string, slug: 'string unique', relationships: { belongsToMany: Course } } Category: { name: string, slug: 'string unique', relationships: { belongsToMany: Course } }

View File

@@ -10,14 +10,11 @@ class Category extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'name',
'slug',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -4,31 +4,40 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Spatie\Sluggable\HasSlug;
use Spatie\Sluggable\SlugOptions;
class City extends Model class City extends Model
{ {
use HasFactory; use HasFactory;
use HasSlug;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
*
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'country_id',
'name',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.
*
* @var array * @var array
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'country_id' => 'integer', 'country_id' => 'integer',
]; ];
/**
* Get the options for generating the slug.
*/
public function getSlugOptions(): SlugOptions
{
return SlugOptions::create()
->generateSlugsFrom('name')
->saveSlugsTo('slug')
->usingLanguage('de');
}
public function country(): \Illuminate\Database\Eloquent\Relations\BelongsTo public function country(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{ {
return $this->belongsTo(Country::class); return $this->belongsTo(Country::class);

View File

@@ -10,14 +10,11 @@ class Country extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'name',
'code',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -10,14 +10,11 @@ class Course extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'lecturer_id',
'name',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -10,16 +10,11 @@ class Event extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'course_id',
'venue_id',
'from',
'to',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -10,16 +10,11 @@ class Lecturer extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'team_id',
'name',
'slug',
'active',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -10,14 +10,11 @@ class Participant extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'first_name',
'last_name',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -10,15 +10,11 @@ class Registration extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'event_id',
'participant_id',
'active',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -10,16 +10,11 @@ class Venue extends Model
use HasFactory; use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that aren't mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $guarded = [];
'city_id',
'name',
'slug',
'street',
];
/** /**
* The attributes that should be cast to native types. * The attributes that should be cast to native types.

View File

@@ -9,8 +9,6 @@ use Laravel\Nova\Fields\BelongsToMany;
class Category extends Resource class Category extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -34,11 +32,6 @@ class Category extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Categories');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -2,52 +2,53 @@
namespace App\Nova; namespace App\Nova;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\ID; use Laravel\Nova\Fields\ID;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\Text; use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\BelongsTo;
class City extends Resource class City extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
*
* @var string * @var string
*/ */
public static $model = \App\Models\City::class; public static $model = \App\Models\City::class;
/** /**
* The single value that should be used to represent the resource when being displayed. * The single value that should be used to represent the resource when being displayed.
*
* @var string * @var string
*/ */
public static $title = 'id'; public static $title = 'id';
/** /**
* The columns that should be searched. * The columns that should be searched.
*
* @var array * @var array
*/ */
public static $search = [ public static $search = [
'id', 'id',
]; ];
public static function label()
{
return __('Cities');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
*
* @return array * @return array
*/ */
public function fields(Request $request) public function fields(Request $request)
{ {
return [ return [
ID::make() ID::make()->sortable(),
->sortable(),
Text::make('Name') Text::make('Name')
->rules('required', 'string'), ->rules('required', 'string'),
Text::make('Slug')
->rules('required', 'string', 'unique:cities,slug'),
BelongsTo::make('Country'), BelongsTo::make('Country'),
@@ -58,7 +59,6 @@ class City extends Resource
* Get the cards available for the request. * Get the cards available for the request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
*
* @return array * @return array
*/ */
public function cards(Request $request) public function cards(Request $request)
@@ -70,7 +70,6 @@ class City extends Resource
* Get the filters available for the resource. * Get the filters available for the resource.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
*
* @return array * @return array
*/ */
public function filters(Request $request) public function filters(Request $request)
@@ -82,7 +81,6 @@ class City extends Resource
* Get the lenses available for the resource. * Get the lenses available for the resource.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
*
* @return array * @return array
*/ */
public function lenses(Request $request) public function lenses(Request $request)
@@ -94,7 +92,6 @@ class City extends Resource
* Get the actions available for the resource. * Get the actions available for the resource.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
*
* @return array * @return array
*/ */
public function actions(Request $request) public function actions(Request $request)

View File

@@ -9,8 +9,6 @@ use Laravel\Nova\Fields\HasMany;
class Country extends Resource class Country extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -34,11 +32,6 @@ class Country extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Countries');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -10,8 +10,6 @@ use Laravel\Nova\Fields\BelongsToMany;
class Course extends Resource class Course extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -35,11 +33,6 @@ class Course extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Courses');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -9,8 +9,6 @@ use Laravel\Nova\Fields\BelongsTo;
class Event extends Resource class Event extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -34,11 +32,6 @@ class Event extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Events');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -10,8 +10,6 @@ use Laravel\Nova\Fields\BelongsTo;
class Lecturer extends Resource class Lecturer extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -35,11 +33,6 @@ class Lecturer extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Lecturers');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -8,8 +8,6 @@ use Laravel\Nova\Fields\Text;
class Participant extends Resource class Participant extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -33,11 +31,6 @@ class Participant extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Participants');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -9,8 +9,6 @@ use Laravel\Nova\Fields\BelongsTo;
class Registration extends Resource class Registration extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -34,11 +32,6 @@ class Registration extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Registrations');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -9,8 +9,6 @@ use Laravel\Nova\Fields\BelongsTo;
class Venue extends Resource class Venue extends Resource
{ {
/** /**
* The model the resource corresponds to. * The model the resource corresponds to.
* *
@@ -34,11 +32,6 @@ class Venue extends Resource
'id', 'id',
]; ];
public static function label()
{
return __('Venues');
}
/** /**
* Get the fields displayed by the resource. * Get the fields displayed by the resource.
* *

View File

@@ -14,6 +14,7 @@ class TeamPolicy
* Determine whether the user can view any models. * Determine whether the user can view any models.
* *
* @param \App\Models\User $user * @param \App\Models\User $user
*
* @return mixed * @return mixed
*/ */
public function viewAny(User $user) public function viewAny(User $user)
@@ -26,6 +27,7 @@ class TeamPolicy
* *
* @param \App\Models\User $user * @param \App\Models\User $user
* @param \App\Models\Team $team * @param \App\Models\Team $team
*
* @return mixed * @return mixed
*/ */
public function view(User $user, Team $team) public function view(User $user, Team $team)
@@ -37,11 +39,12 @@ class TeamPolicy
* Determine whether the user can create models. * Determine whether the user can create models.
* *
* @param \App\Models\User $user * @param \App\Models\User $user
*
* @return mixed * @return mixed
*/ */
public function create(User $user) public function create(User $user)
{ {
return true; return false;
} }
/** /**
@@ -49,6 +52,7 @@ class TeamPolicy
* *
* @param \App\Models\User $user * @param \App\Models\User $user
* @param \App\Models\Team $team * @param \App\Models\Team $team
*
* @return mixed * @return mixed
*/ */
public function update(User $user, Team $team) public function update(User $user, Team $team)
@@ -61,6 +65,7 @@ class TeamPolicy
* *
* @param \App\Models\User $user * @param \App\Models\User $user
* @param \App\Models\Team $team * @param \App\Models\Team $team
*
* @return mixed * @return mixed
*/ */
public function addTeamMember(User $user, Team $team) public function addTeamMember(User $user, Team $team)
@@ -73,6 +78,7 @@ class TeamPolicy
* *
* @param \App\Models\User $user * @param \App\Models\User $user
* @param \App\Models\Team $team * @param \App\Models\Team $team
*
* @return mixed * @return mixed
*/ */
public function updateTeamMember(User $user, Team $team) public function updateTeamMember(User $user, Team $team)
@@ -85,6 +91,7 @@ class TeamPolicy
* *
* @param \App\Models\User $user * @param \App\Models\User $user
* @param \App\Models\Team $team * @param \App\Models\Team $team
*
* @return mixed * @return mixed
*/ */
public function removeTeamMember(User $user, Team $team) public function removeTeamMember(User $user, Team $team)
@@ -97,10 +104,12 @@ class TeamPolicy
* *
* @param \App\Models\User $user * @param \App\Models\User $user
* @param \App\Models\Team $team * @param \App\Models\Team $team
*
* @return mixed * @return mixed
*/ */
public function delete(User $user, Team $team) public function delete(User $user, Team $team)
{ {
return $user->ownsTeam($team); // return $user->ownsTeam($team);
return false;
} }
} }

View File

@@ -112,7 +112,7 @@ return [
| generated "unguarded" models. | generated "unguarded" models.
| |
*/ */
'use_guarded' => false, 'use_guarded' => true,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -104,6 +104,7 @@ return [
DispatchServingNovaEvent::class, DispatchServingNovaEvent::class,
BootTools::class, BootTools::class,
\Itsmejoshua\Novaspatiepermissions\ForgetCachedPermissions::class, \Itsmejoshua\Novaspatiepermissions\ForgetCachedPermissions::class,
'verified'
], ],
'api_middleware' => [ 'api_middleware' => [

View File

@@ -26,6 +26,7 @@ class CityFactory extends Factory
return [ return [
'country_id' => Country::factory(), 'country_id' => Country::factory(),
'name' => $this->faker->name, 'name' => $this->faker->name,
'slug' => $this->faker->slug,
]; ];
} }
} }

View File

@@ -19,6 +19,7 @@ class CreateCitiesTable extends Migration
$table->id(); $table->id();
$table->foreignId('country_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate(); $table->foreignId('country_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
$table->string('name'); $table->string('name');
$table->string('slug')->unique();
$table->timestamps(); $table->timestamps();
}); });

View File

@@ -59,14 +59,17 @@ class DatabaseSeeder extends Seeder
City::create([ City::create([
'country_id' => 1, 'country_id' => 1,
'name' => 'Füssen', 'name' => 'Füssen',
'slug' => str('Füssen')->slug('-', 'de'),
]); ]);
City::create([ City::create([
'country_id' => 2, 'country_id' => 2,
'name' => 'Wien', 'name' => 'Wien',
'slug' => str('Wien')->slug('-', 'de'),
]); ]);
City::create([ City::create([
'country_id' => 3, 'country_id' => 3,
'name' => 'Zürich', 'name' => 'Zürich',
'slug' => str('Zürich')->slug('-', 'de'),
]); ]);
Venue::create([ Venue::create([
'city_id' => 1, 'city_id' => 1,

View File

@@ -7,6 +7,7 @@ models:
City: City:
country_id: id foreign country_id: id foreign
name: string name: string
slug: string unique
Lecturer: Lecturer:
team_id: id foreign team_id: id foreign
name: string name: string

View File

@@ -19,32 +19,24 @@ __webpack_require__.r(__webpack_exports__);
}, },
methods: { methods: {
link: function link(path) { link: function link(path) {
return "https://nova.laravel.com/docs/".concat(this.version, "/").concat(path); return "/nova/".concat(path);
} }
}, },
computed: { computed: {
resources: function resources() { cities: function cities() {
return this.link('resources'); return this.link('resources/cities');
}, },
actions: function actions() { venues: function venues() {
return this.link('actions/defining-actions.html'); return this.link('resources/venues');
}, },
filters: function filters() { lecturers: function lecturers() {
return this.link('filters/defining-filters.html'); return this.link('resources/lecturers');
}, },
lenses: function lenses() { courses: function courses() {
return this.link('lenses/defining-lenses.html'); return this.link('resources/courses');
}, },
metrics: function metrics() { events: function events() {
return this.link('metrics/defining-metrics.html'); return this.link('resources/events');
},
cards: function cards() {
return this.link('customization/cards.html');
},
version: function version() {
var parts = Nova.config('version').split('.');
parts.splice(-2);
return "".concat(parts, ".0");
} }
} }
}); });
@@ -142,7 +134,10 @@ var _hoisted_25 = {
var _hoisted_26 = { var _hoisted_26 = {
"class": "md:border-b-0 border-b border-gray-200 dark:border-gray-700" "class": "md:border-b-0 border-b border-gray-200 dark:border-gray-700"
}; };
var _hoisted_27 = ["href"]; var _hoisted_27 = {
href: "#",
"class": "no-underline flex p-6"
};
var _hoisted_28 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { var _hoisted_28 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
"class": "flex justify-center w-11 flex-shrink-0 mr-6" "class": "flex justify-center w-11 flex-shrink-0 mr-6"
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", { }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
@@ -165,7 +160,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
}, { }, {
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
href: $options.resources, target: "_blank",
href: $options.cities,
"class": "no-underline flex p-6" "class": "no-underline flex p-6"
}, [_hoisted_8, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, { }, [_hoisted_8, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
level: 3 level: 3
@@ -176,7 +172,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
_: 1 /* STABLE */ _: 1 /* STABLE */
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_9, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Städte" und suche nach der Stadt, in der du die Items anlegen möchtest. Wenn du die Stadt nicht findest, kannst du sie anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_7)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_9, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Städte" und suche nach der Stadt, in der du die Items anlegen möchtest. Wenn du die Stadt nicht findest, kannst du sie anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_7)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
href: $options.actions, target: "_blank",
href: $options.venues,
"class": "no-underline flex p-6" "class": "no-underline flex p-6"
}, [_hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, { }, [_hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
level: 3 level: 3
@@ -187,7 +184,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
_: 1 /* STABLE */ _: 1 /* STABLE */
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_13, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Veranstaltungs-Orte" und suche nach dem Ort, an dem du die Items anlegen möchtest. Wenn du den Ort nicht findest, kannst du ihn anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_11)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_13, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Veranstaltungs-Orte" und suche nach dem Ort, an dem du die Items anlegen möchtest. Wenn du den Ort nicht findest, kannst du ihn anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_11)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
href: $options.filters, target: "_blank",
href: $options.lecturers,
"class": "no-underline flex p-6" "class": "no-underline flex p-6"
}, [_hoisted_16, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, { }, [_hoisted_16, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
level: 3 level: 3
@@ -198,7 +196,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
_: 1 /* STABLE */ _: 1 /* STABLE */
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_17, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Dozenten" und suche nach deinem Dozenten-Profil. Wenn du es nicht findest, kannst du es anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_15)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_18, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_17, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Dozenten" und suche nach deinem Dozenten-Profil. Wenn du es nicht findest, kannst du es anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_15)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_18, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
href: $options.lenses, target: "_blank",
href: $options.courses,
"class": "no-underline flex p-6" "class": "no-underline flex p-6"
}, [_hoisted_20, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, { }, [_hoisted_20, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
level: 3 level: 3
@@ -209,7 +208,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
_: 1 /* STABLE */ _: 1 /* STABLE */
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_21, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Kurse" und suche nach dem Kurs, den du editieren möchtest. Wenn du den Kurs nicht findest, kannst du ihn anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_19)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_21, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Kurse" und suche nach dem Kurs, den du editieren möchtest. Wenn du den Kurs nicht findest, kannst du ihn anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_19)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
href: $options.metrics, target: "_blank",
href: $options.events,
"class": "no-underline flex p-6" "class": "no-underline flex p-6"
}, [_hoisted_24, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, { }, [_hoisted_24, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
level: 3 level: 3
@@ -219,10 +219,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
}), }),
_: 1 /* STABLE */ _: 1 /* STABLE */
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_25, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Termine" und suche nach dem Termin, den du editieren möchtest. Wenn du den Termin nicht findest, kannst du ihn anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_23)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_26, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_25, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Gehe auf die Seite "Termine" und suche nach dem Termin, den du editieren möchtest. Wenn du den Termin nicht findest, kannst du ihn anlegen.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_23)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_26, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", _hoisted_27, [_hoisted_28, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
href: $options.cards,
"class": "no-underline flex p-6"
}, [_hoisted_28, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Heading, {
level: 3 level: 3
}, { }, {
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
@@ -230,8 +227,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
}), }),
_: 1 /* STABLE */ _: 1 /* STABLE */
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_29, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Wenn Buttons zur Bearbeitung fehlen, dann hast du nicht die nötigen Berechtigungen. Melde dich bei einem der Admins.')), 1 /* TEXT */)])], 8 /* PROPS */, _hoisted_27)])])]; }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_29, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.__('Wenn Buttons zur Bearbeitung fehlen, dann hast du nicht die nötigen Berechtigungen. Melde dich bei einem der Admins.')), 1 /* TEXT */)])])])])];
}), }),
_: 1 /* STABLE */ _: 1 /* STABLE */
})])]); })])]);
} }

View File

@@ -12,7 +12,7 @@
<Card class="mt-8"> <Card class="mt-8">
<div class="md:grid md:grid-cols-2"> <div class="md:grid md:grid-cols-2">
<div class="border-r border-b border-gray-200 dark:border-gray-700"> <div class="border-r border-b border-gray-200 dark:border-gray-700">
<a :href="resources" class="no-underline flex p-6"> <a target="_blank" :href="cities" class="no-underline flex p-6">
<div class="flex justify-center w-11 flex-shrink-0 mr-6"> <div class="flex justify-center w-11 flex-shrink-0 mr-6">
<div class="text-4xl text-primary-500 dark:text-primary-600">1.</div> <div class="text-4xl text-primary-500 dark:text-primary-600">1.</div>
</div> </div>
@@ -29,7 +29,7 @@
</div> </div>
<div class="border-b border-gray-200 dark:border-gray-700"> <div class="border-b border-gray-200 dark:border-gray-700">
<a :href="actions" class="no-underline flex p-6"> <a target="_blank" :href="venues" class="no-underline flex p-6">
<div class="flex justify-center w-11 flex-shrink-0 mr-6"> <div class="flex justify-center w-11 flex-shrink-0 mr-6">
<div class="text-4xl text-primary-500 dark:text-primary-600">2.</div> <div class="text-4xl text-primary-500 dark:text-primary-600">2.</div>
</div> </div>
@@ -46,7 +46,7 @@
</div> </div>
<div class="border-r border-b border-gray-200 dark:border-gray-700"> <div class="border-r border-b border-gray-200 dark:border-gray-700">
<a :href="filters" class="no-underline flex p-6"> <a target="_blank" :href="lecturers" class="no-underline flex p-6">
<div class="flex justify-center w-11 flex-shrink-0 mr-6"> <div class="flex justify-center w-11 flex-shrink-0 mr-6">
<div class="text-4xl text-primary-500 dark:text-primary-600">3.</div> <div class="text-4xl text-primary-500 dark:text-primary-600">3.</div>
</div> </div>
@@ -63,7 +63,7 @@
</div> </div>
<div class="border-b border-gray-200 dark:border-gray-700"> <div class="border-b border-gray-200 dark:border-gray-700">
<a :href="lenses" class="no-underline flex p-6"> <a target="_blank" :href="courses" class="no-underline flex p-6">
<div class="flex justify-center w-11 flex-shrink-0 mr-6"> <div class="flex justify-center w-11 flex-shrink-0 mr-6">
<div class="text-4xl text-primary-500 dark:text-primary-600">4.</div> <div class="text-4xl text-primary-500 dark:text-primary-600">4.</div>
</div> </div>
@@ -82,7 +82,7 @@
<div <div
class="border-r md:border-b-0 border-b border-gray-200 dark:border-gray-700" class="border-r md:border-b-0 border-b border-gray-200 dark:border-gray-700"
> >
<a :href="metrics" class="no-underline flex p-6"> <a target="_blank" :href="events" class="no-underline flex p-6">
<div class="flex justify-center w-11 flex-shrink-0 mr-6"> <div class="flex justify-center w-11 flex-shrink-0 mr-6">
<div class="text-4xl text-primary-500 dark:text-primary-600">5.</div> <div class="text-4xl text-primary-500 dark:text-primary-600">5.</div>
</div> </div>
@@ -101,7 +101,7 @@
<div <div
class="md:border-b-0 border-b border-gray-200 dark:border-gray-700" class="md:border-b-0 border-b border-gray-200 dark:border-gray-700"
> >
<a :href="cards" class="no-underline flex p-6"> <a href="#" class="no-underline flex p-6">
<div class="flex justify-center w-11 flex-shrink-0 mr-6"> <div class="flex justify-center w-11 flex-shrink-0 mr-6">
<div class="text-4xl text-primary-500 dark:text-primary-600">6.</div> <div class="text-4xl text-primary-500 dark:text-primary-600">6.</div>
</div> </div>
@@ -132,35 +132,25 @@ export default {
methods: { methods: {
link (path) { link (path) {
return `https://nova.laravel.com/docs/${this.version}/${path}` return `/nova/${path}`
}, },
}, },
computed: { computed: {
resources () { cities () {
return this.link('resources') return this.link('resources/cities')
}, },
actions () { venues () {
return this.link('actions/defining-actions.html') return this.link('resources/venues')
}, },
filters () { lecturers () {
return this.link('filters/defining-filters.html') return this.link('resources/lecturers')
}, },
lenses () { courses () {
return this.link('lenses/defining-lenses.html') return this.link('resources/courses')
}, },
metrics () { events () {
return this.link('metrics/defining-metrics.html') return this.link('resources/events')
},
cards () {
return this.link('customization/cards.html')
},
version () {
const parts = Nova.config('version')
.split('.')
parts.splice(-2)
return `${parts}.0`
}, },
}, },
} }