Skip to content

Commit

Permalink
Version 01 of Page finished
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromesigg committed Feb 8, 2021
1 parent b7975da commit f25ae0d
Show file tree
Hide file tree
Showing 73 changed files with 964 additions and 923 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/AdminHistoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Photo;
use App\History;
use App\ArchiveStatus;
use Illuminate\Support\Str;
use Illuminate\Http\Request;

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

$input['photo_id'] = $photo->id;
}
$input['shorttitle'] = Str::slug($input['title'],'_');

History::whereId($id)->first()->update($input);
return redirect('/admin/histories');
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/AdminHomepageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function update(Request $request, $id)
$input['background_top_photo_id'] = $photo->id;
}
if($file = $request->file('background_bottom_photo_id')){
$name = 'event-bg.jpg';
$name = 'events-bg.jpg';
$file->move('images', $name);
$photo = Photo::create(['file'=>$name]);

Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/AdminUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public function index()
{
//
$users = User::paginate(10);
return view('admin.users.index', compact('users'));
$roles = Role::pluck('name','id')->all();
return view('admin.users.index', compact('users', 'roles'));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public function up()
{
Schema::table('homepages', function (Blueprint $table) {
//
$table->text('address');
$table->string('phone');
$table->string('mail');
$table->text('address')->nullable();
$table->string('phone')->nullable();
$table->string('mail')->nullable();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public function up()
Schema::create('histories', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('shorttitle');
$table->string('shorttitle')->nullable();
$table->string('title');
$table->string('subtitle');
$table->string('subtitle')->nullable();
$table->text('description');
$table->integer('sort-index');
$table->bigInteger('archive_status_id')->index()->unsigned()->nullable();
Expand Down
Loading

0 comments on commit f25ae0d

Please sign in to comment.