Skip to content

Commit f25ae0d

Browse files
committed
Version 01 of Page finished
1 parent b7975da commit f25ae0d

73 files changed

Lines changed: 964 additions & 923 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Http/Controllers/AdminHistoryController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Photo;
66
use App\History;
77
use App\ArchiveStatus;
8+
use Illuminate\Support\Str;
89
use Illuminate\Http\Request;
910

1011
class AdminHistoryController extends Controller
@@ -99,6 +100,8 @@ public function update(Request $request, $id)
99100

100101
$input['photo_id'] = $photo->id;
101102
}
103+
$input['shorttitle'] = Str::slug($input['title'],'_');
104+
102105
History::whereId($id)->first()->update($input);
103106
return redirect('/admin/histories');
104107
}

app/Http/Controllers/AdminHomepageController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function update(Request $request, $id)
9898
$input['background_top_photo_id'] = $photo->id;
9999
}
100100
if($file = $request->file('background_bottom_photo_id')){
101-
$name = 'event-bg.jpg';
101+
$name = 'events-bg.jpg';
102102
$file->move('images', $name);
103103
$photo = Photo::create(['file'=>$name]);
104104

app/Http/Controllers/AdminUserController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public function index()
1818
{
1919
//
2020
$users = User::paginate(10);
21-
return view('admin.users.index', compact('users'));
21+
$roles = Role::pluck('name','id')->all();
22+
return view('admin.users.index', compact('users', 'roles'));
2223
}
2324

2425
/**

database/migrations/2021_02_07_202040_add_address_mail_and_phone_to_homepage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public function up()
1515
{
1616
Schema::table('homepages', function (Blueprint $table) {
1717
//
18-
$table->text('address');
19-
$table->string('phone');
20-
$table->string('mail');
18+
$table->text('address')->nullable();
19+
$table->string('phone')->nullable();
20+
$table->string('mail')->nullable();
2121
});
2222
}
2323

database/migrations/2021_02_07_203820_create_histories_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public function up()
1616
Schema::create('histories', function (Blueprint $table) {
1717
$table->id();
1818
$table->timestamps();
19-
$table->string('shorttitle');
19+
$table->string('shorttitle')->nullable();
2020
$table->string('title');
21-
$table->string('subtitle');
21+
$table->string('subtitle')->nullable();
2222
$table->text('description');
2323
$table->integer('sort-index');
2424
$table->bigInteger('archive_status_id')->index()->unsigned()->nullable();

0 commit comments

Comments
 (0)