mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2024-12-13 10:48:25 +01:00
ec88a74889
Fixed bug where users littlelink pages (domain.com/@username) would display a 404 error. This was caused due to the .env config file not containing an App URL. This issue could be solved by simply adding a URL to the config, this is now not necessary anymore, making the setup process easier and less confusing. I changed every instance of "{{ config('app.url') }}" to "{{ url(' ') }}". This effectively automatically uses the correct URL for LittleLink links, even if LittleLink Custom is set up in a subdirectory. In my testing, I couldn't find any problems this might have caused, so this appears to do the job just as well as setting the URL in the config. If I find any issues with this, I will revert this change.
47 lines
1.8 KiB
PHP
Executable File
47 lines
1.8 KiB
PHP
Executable File
@extends('layouts.sidebar')
|
|
|
|
@section('content')
|
|
|
|
<h2 class="mb-4"><i class="bi bi-file-earmark-break"> Page</i></h2>
|
|
|
|
<form action="{{ route('editPage') }}" enctype="multipart/form-data" method="post">
|
|
@csrf
|
|
<div class="form-group col-lg-8">
|
|
<label>Logo</label>
|
|
<input type="file" class="form-control-file" name="image">
|
|
</div>
|
|
@foreach($pages as $page)
|
|
|
|
<div class="form-group col-lg-8">
|
|
@if(file_exists(base_path("img/$page->littlelink_name" . ".png" )))
|
|
<img src="{{ asset("img/$page->littlelink_name" . ".png") }}" style="width: 75px; border-radius: 50%;">
|
|
@else
|
|
<img src="{{ asset('littlelink/images/logo.svg') }}" style="width: 75px;">
|
|
@endif
|
|
</div>
|
|
|
|
<!--<div class="form-group col-lg-8">
|
|
<label>Path name</label>
|
|
@<input type="text" class="form-control" name="pageName" value="{{ $page->littlelink_name ?? '' }}">
|
|
</div>-->
|
|
|
|
<div class="form-group col-lg-8">
|
|
<label>Page URL</label>
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text">{{ url('') }}/@</div>
|
|
</div>
|
|
<input type="text" class="form-control" name="pageName" value="{{ $page->littlelink_name ?? '' }}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group col-lg-8">
|
|
<label>Page Description</label>
|
|
<textarea class="form-control" name="pageDescription" rows="3">{{ $page->littlelink_description ?? '' }}</textarea>
|
|
</div>
|
|
@endforeach
|
|
<button type="submit" class="mt-3 ml-3 btn btn-info">Submit</button>
|
|
</form>
|
|
|
|
@endsection
|