Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #33

Merged
merged 6 commits into from
Oct 10, 2024
Merged

Dev #33

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,24 @@ public function index()
{
return view('home');
}

/**
* @return array
*/
private function getTranslations(): array
{
return $this->translations = [
'test_translation' => __('Document Serial Number'),
];
}

/**
* @return array
*/
private function getPermissions(): array
{
return $this->permissions = [
'view home',
];
}
}
68 changes: 68 additions & 0 deletions app/Http/Controllers/InterfaceUsageController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

namespace App\Http\Controllers;

use App\Models\InterfaceUsage;
use App\Http\Requests\StoreInterfaceUsageRequest;
use App\Http\Requests\UpdateInterfaceUsageRequest;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Response;

class InterfaceUsageController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): Response
{
//
}

/**
* Show the form for creating a new resource.
*/
public function create(): Response
{
//
}

/**
* Store a newly created resource in storage.
*/
public function store(StoreInterfaceUsageRequest $request): RedirectResponse
{
//
}

/**
* Display the specified resource.
*/
public function show(InterfaceUsage $interfaceUsage): Response
{
//
}

/**
* Show the form for editing the specified resource.
*/
public function edit(InterfaceUsage $interfaceUsage): Response
{
//
}

/**
* Update the specified resource in storage.
*/
public function update(UpdateInterfaceUsageRequest $request, InterfaceUsage $interfaceUsage): RedirectResponse
{
//
}

/**
* Remove the specified resource from storage.
*/
public function destroy(InterfaceUsage $interfaceUsage): RedirectResponse
{
//
}
}
28 changes: 28 additions & 0 deletions app/Http/Requests/StoreInterfaceUsageRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreInterfaceUsageRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}

/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
//
];
}
}
28 changes: 28 additions & 0 deletions app/Http/Requests/UpdateInterfaceUsageRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UpdateInterfaceUsageRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}

/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
//
];
}
}
15 changes: 15 additions & 0 deletions app/Models/InterfaceUsage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class InterfaceUsage extends Model
{
use HasFactory;

protected $guarded = [];

protected $fillable = [];
}
66 changes: 66 additions & 0 deletions app/Policies/InterfaceUsagePolicy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

namespace App\Policies;

use App\Models\InterfaceUsage;
use App\Models\User;
use Illuminate\Auth\Access\Response;

class InterfaceUsagePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
//
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, InterfaceUsage $interfaceUsage): bool
{
//
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
//
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, InterfaceUsage $interfaceUsage): bool
{
//
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, InterfaceUsage $interfaceUsage): bool
{
//
}

/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, InterfaceUsage $interfaceUsage): bool
{
//
}

/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, InterfaceUsage $interfaceUsage): bool
{
//
}
}
26 changes: 26 additions & 0 deletions app/View/Components/ShowUserPermissions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\View\Components;

use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class ShowUserPermissions extends Component
{
/**
* Create a new component instance.
*/
public function __construct()
{
//
}

/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.show-user-permissions');
}
}
Loading
Loading