Setting company logo and invoice logo delete issue solved
This commit is contained in:
parent
cf15174dd8
commit
da5eb9b16a
@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Common;
|
namespace App\Http\Controllers\Common;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use App\Models\Common\Media;
|
use App\Models\Common\Media;
|
||||||
use File;
|
use File;
|
||||||
use Storage;
|
use Storage;
|
||||||
@ -51,7 +52,7 @@ class Uploads extends Controller
|
|||||||
* @param $id
|
* @param $id
|
||||||
* @return callable
|
* @return callable
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id, Request $request)
|
||||||
{
|
{
|
||||||
$media = Media::find($id);
|
$media = Media::find($id);
|
||||||
|
|
||||||
@ -68,6 +69,17 @@ class Uploads extends Controller
|
|||||||
|
|
||||||
File::delete($path);
|
File::delete($path);
|
||||||
|
|
||||||
|
if (!empty($request->input('page'))) {
|
||||||
|
switch ($request->input('page')) {
|
||||||
|
case 'setting':
|
||||||
|
setting()->set($request->input('key'), '');
|
||||||
|
|
||||||
|
setting()->save();
|
||||||
|
break;
|
||||||
|
default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return back();
|
return back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
public/css/app.css
vendored
4
public/css/app.css
vendored
@ -549,3 +549,7 @@ span.picture, span.attachment {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-group.col-md-6 input.fake-input.form-control{
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
@ -221,6 +221,9 @@
|
|||||||
company_logo_html += ' <a id="remove-company_logo" href="javascript:void();">';
|
company_logo_html += ' <a id="remove-company_logo" href="javascript:void();">';
|
||||||
company_logo_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
company_logo_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
||||||
company_logo_html += ' </a>';
|
company_logo_html += ' </a>';
|
||||||
|
company_logo_html += ' <input type="hidden" name="page" value="setting" />';
|
||||||
|
company_logo_html += ' <input type="hidden" name="key" value="general.company_logo" />';
|
||||||
|
company_logo_html += ' <input type="hidden" name="value" value="{{ $setting['company_logo']->id }}" />';
|
||||||
company_logo_html += ' {!! Form::close() !!}';
|
company_logo_html += ' {!! Form::close() !!}';
|
||||||
company_logo_html += '</span>';
|
company_logo_html += '</span>';
|
||||||
|
|
||||||
@ -252,6 +255,9 @@
|
|||||||
invoice_logo_html += ' <a id="remove-invoice_logo" href="javascript:void();">';
|
invoice_logo_html += ' <a id="remove-invoice_logo" href="javascript:void();">';
|
||||||
invoice_logo_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
invoice_logo_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
||||||
invoice_logo_html += ' </a>';
|
invoice_logo_html += ' </a>';
|
||||||
|
invoice_logo_html += ' <input type="hidden" name="page" value="setting" />';
|
||||||
|
invoice_logo_html += ' <input type="hidden" name="key" value="general.invoice_logo" />';
|
||||||
|
invoice_logo_html += ' <input type="hidden" name="value" value="{{ $setting['invoice_logo']->id }}" />';
|
||||||
invoice_logo_html += ' {!! Form::close() !!}';
|
invoice_logo_html += ' {!! Form::close() !!}';
|
||||||
invoice_logo_html += '</span>';
|
invoice_logo_html += '</span>';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user