Fixed error AND 0x01

This commit is contained in:
Sebastian Davaris 2020-06-29 14:49:57 +02:00
parent eb749e58a5
commit 988ceb7c8a
8 changed files with 36 additions and 60 deletions

View File

@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class MenuPlan extends Model
{
protected $fillable = [
'monday', "tuesday", 'wednesday', 'thursday', "friday", "saturday", "sunday"
'monday', "tuesday", 'wednesday', 'thursday'
];
}

View File

@ -13,6 +13,9 @@ class CreateUsersTable extends Migration
*/
public function up()
{
if(Schema::hasTable("users"))
return;
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name_first');

View File

@ -20,13 +20,17 @@ class CreatePermissionTables extends Migration
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
}
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('description');
$table->string('guard_name');
$table->timestamps();
});
if(!Schema::hasTable("permissions"))
{
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('description');
$table->string('guard_name');
$table->timestamps();
});
}
Schema::create($tableNames['roles'], function (Blueprint $table) {
$table->bigIncrements('id');

View File

@ -19,9 +19,9 @@ class CreateMenuPlans extends Migration
$table->string('tuesday', 255);
$table->string('wednesday', 255);
$table->string('thursday', 255);
$table->string('friday', 255);
$table->string('saturday', 255);
$table->string('sunday', 255);
// $table->string('friday', 255);
// $table->string('saturday', 255);
// $table->string('sunday', 255);
$table->timestamps();
//$table->text('description');
});

View File

@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStaffTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('staff', function (Blueprint $table) {
$table->id();
$table->string('name_first');
$table->string('name_last');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->integer("phone")->unique();
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('staff');
}
}

View File

@ -61,15 +61,15 @@
<a href="{{ route("contacts.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
</div>
</div>
<div class="segment">
<h3 class="text-white">Personale</h3>
<div class="row">
<a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>
</div>
<div class="row">
<a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>
</div>
</div>
{{-- <div class="segment">--}}
{{-- <h3 class="text-white">Personale</h3>--}}
{{-- <div class="row">--}}
{{-- <a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>--}}
{{-- </div>--}}
{{-- <div class="row">--}}
{{-- <a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>--}}
{{-- </div>--}}
{{-- </div>--}}
<div class="segment">
<h3 class="text-white">Feedback</h3>
<div class="row">

View File

@ -26,7 +26,14 @@
<td>{{ $user->email }}</td>
<td>{{ $user->phone }}</td>
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href="{{ route("users.destroy", [ "user" => $user ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
<td>
<form method="post" action="{{ route("users.destroy", [ "user" => $user ]) }}" class="w-100">
@csrf
@method("delete")
<button class="w-100"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr>
@endforeach
</table>

View File

@ -31,7 +31,7 @@ Route::get("phones", "PhoneController@index")->name("phones.index");
Route::resource("contacts", "ContactController");
Route::resource("menu-plans", "MenuPlanController");
Route::resource("users", "UserController");
Route::resource("staff", "StaffController");
//Route::resource("staff", "StaffController");
Route::resource("events", "EventController");
Route::resource("washing-machines", "WashingMachineController");
Route::resource("washing-reservations", "WashingReservationController");