I have 2 same class/table/controller
In route:list
| | GET|HEAD | newsletter/{newsletter} | public.newsletter.show | App\Http\Controllers\Mails\NewsLetterController@show
And
| | GET|HEAD | bid/{bid} | public.bid.show | App\Http\Controllers\Shops\BidController@show
In model for bid (same for NewsLetter):
use \Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
class Bid extends Model
{
use Sluggable;
...
public function sluggable() {
return [
'slug'
];
}
Now I can call NewsLetter (news_letters table) by slug But Not for Bid (bids table)
for bids table, I can call it only by Id.
for example this works:
<a href="">newsletter</a>
But not this:
<a href="">bids</a>
But this works:
<a href="">bids</a>
evrythins in tables,web.php,controllers and migration is the same.
what is the wrong?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MijSuy
via IFTTT
Aucun commentaire:
Enregistrer un commentaire