Support the ongoing development of →
Views Blade Packages
Last updated 4 months ago.

Maybe you should post your code so that someone can help you. There is no way to help you without seeing what you have in your code.


The code of the view is as following:

@section('contenu') <br>
<div class="col-sm-offset-3 col-sm-6">
<div class="alert alert-success alert-dismissible">{!! session('ok') !!}</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Liste des produits</h3>
<table class="table">
<th>Prix régulier</th>
<th>prix promotionnel</th>
@foreach ($products as $p)
<td>{!! $p->id !!}</td>
<td class="text-primary"><strong>{!! $p->code !!}</strong></td>
<td>{!! $p->regular_price !!}</td>
<td>{!! $p->promotion_price !!}</td>
<td>{!! link_to_route('product', 'Afficher produit', [$p->id], ['class' => 'btn btn-success btn-block']) !!}</td>
{!! Form::close() !!}
{!! link_to_route('add-product', 'Ajouter un produit', [], ['class' => 'btn btn-info pull-right']) !!}
{!! $links !!}

The code of the controller is as following:

class ProductController extends Controller
public function listProducts(){
$product= new Product;
$links = $products->render();
return view('products_list', compact('products', 'links'));

Note that the same code works finely in another project but in this project it generates the wrong links, the things that make me convinced to a some extent that this is a problem of caching or some thing like that!!

Last updated 5 years ago.

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 - All rights reserved.