:) Can't upload image to open_graph tag and make in view open_graph tag with url: /uploads/images In another views it's ok.
It's a big headache for me and i need your help It's a big headache for me and i need your help It's a big headache for me and i need your help
Part of metatag/index.blade
<div class="form-group">
{!! Form::label('img', 'OpenGraph Image', ['class' => 'col-md-4 control-label']) !!}
<div div class="col-md-6">
{!! Form::file($rw->alias.'_og_image') !!}
@if (isset($item) && $item && $item->$rw->alias.'_og_image')
<div>
<img src="" width="100%"/>
</div>
@endif
</div>
</div>
MetaTag controller
<?php
namespace App\Http\Controllers\Admin;
use Artisaninweb\SoapWrapper\Facades\SoapWrapper;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
/**
* Class ContestController
* @package App\Http\Controllers\Admin
*/
class MetaTagsController extends Controller
{
/**
* @param Request $request
* @return \Illuminate\View\View
*/
public function index(Request $request)
{
$meta_tags = \App\MetaTag::all();
$arr_meta_tags = \Config::get('settings.arr_meta_tags');
return view('admin.meta_tags.index', compact('meta_tags', 'arr_meta_tags'));
}
/**
* @param Request $request
* @return \Illuminate\Http\RedirectResponse
*/
public function store(Request $request)
{
$meta_tags = \App\MetaTag::all();
foreach($meta_tags as $rw)
{
$rw->title = $request->get($rw->alias."_meta_title");
$rw->description = $request->get($rw->alias."_meta_description");
$rw->keywords = $request->get($rw->alias."_meta_keywords");
$rw->og_title = $request->get($rw->alias."_og_title");
$rw->og_description = $request->get($rw->alias."_og_description");
$rw->og_type = $request->get($rw->alias."_og_type");
$rw->og_image = $request->get($rw->alias."_og_image");
$rw->save();
}
return back()->with('message', 'Настройки сохранены');
}
}
Need your help!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire