Yes, so even if the route is wrong it still get in, right?

|
marcosjoao_btu 2022-02-11 18:49:32
The correct link:
href=”{{route(‘imoveis.show’, $imovel->id)}}”
marcosjoao_btu 2022-02-11 18:51:23
this variavel where imovel on page I change with i
marcosjoao_btu 2022-02-11 18:52:29
public function show($id)
{
$imovel = Imovel::with([‘city’, ‘endereco’, ‘finalidade’, ‘proximidades’, ‘tipo’]);
$e = Endereco::all();

return view(‘imoveis.show’, compact(‘imovel’, ‘e’));

}

bsamaasi 2022-02-11 19:04:26
marcosjoao_btu 2022-02-11 18:52:29
public function show($id)
{
$imovel = Imovel::with([‘city’, ‘endereco’, ‘finalidade’, ‘proximidades’, ‘tipo’]);
$e = Endereco::all();

return view(‘imoveis.show’, compact(‘imovel’, ‘e’));

}

You have to be using route model binding to benefit from the above example or you could manual get the model by finding it.

bsamaasi 2022-02-11 19:04:40
public function show($id)
{
$imovel = Imovel::whereSlug($id)->with([‘city’, ‘endereco’, ‘finalidade’, ‘proximidades’, ‘tipo’])->get();
$e = Endereco::all();

return view(‘imoveis.show’, compact(‘imovel’, ‘e’));

}

marcosjoao_btu 2022-02-11 19:05:57
I will try
bsamaasi 2022-02-11 19:06:04
marcosjoao_btu 2022-02-11 18:52:29
public function show($id)
{
$imovel = Imovel::with([‘city’, ‘endereco’, ‘finalidade’, ‘proximidades’, ‘tipo’]);
$e = Endereco::all();

return view(‘imoveis.show’, compact(‘imovel’, ‘e’));

}

You have to be using route model binding to benefit from the above example or you could manual get the model by finding it.

bsamaasi 2022-02-11 19:06:46
bsamaasi 2022-02-11 19:06:04
You have to be using route model binding to benefit from the above example or you could manual get the model by finding it.

This message was before the example

2022-02-11 19:14:15
Post man show me status 409 error while registering a user by api….?
marcosjoao_btu 2022-02-11 19:39:46
laravel_discuss-107911.jpg

marcosjoao_btu 2022-02-11 19:40:14
if I use on link href=”{{route(‘imoveis.show’, “$imovel->id/$imovel->slug”)}}”
marcosjoao_btu 2022-02-11 19:40:31
take the correct url but go to 404 error
marcosjoao_btu 2022-02-11 19:41:21
with the instructions passed take only http://127.0.0.1:8000/imoveis/62
DesolatorMagno 2022-02-11 19:49:15
That is wrong in so many lvls
marcosjoao_btu 2022-02-11 19:49:40
I put on model befor
public function setSeoAttribute(){
$this->attributes[‘slug’] = Str::slug($this->attributes[‘slug’]);
}
Is it neccessary or not
marcosjoao_btu 2022-02-11 19:50:39
setSlugAttribute(){
marcosjoao_btu 2022-02-11 22:29:06
I discover the mistake, I wa putin a / after ID, se withaut this bar works fine.
marcosjoao_btu 2022-02-11 22:29:27
http://127.0.0.1:8000/imoveis/63-locacao-terreno-marcos-santos-dddd-barra-bonita-sp
DesolatorMagno 2022-02-11 22:30:37
now try the same route but change the slug, use a wrong slug and see what happen
marcosjoao_btu 2022-02-11 22:31:14
ok
marcosjoao_btu 2022-02-11 22:32:33
show but without the complet url http://127.0.0.1:8000/imoveis/63-
DesolatorMagno 2022-02-11 22:33:50
Yes, so even if the route is wrong it still get in, right?
marcosjoao_btu 2022-02-11 22:34:48
note do rout but the property after route
WEBLYSS SOFTWARE 2022-02-11 22:35:18
HI,ANYONE INTERESTED FOR OWN DOMAIN BASED GMAIL ACCOUNT/ OFFICE 365 (BUSINESS/PROFESSIONAL EMAIL,30 GB SPACE) IN A DISCOUNTED COST. PLS PM OR CALL +918763609732/SALES@WEBLYSS.COM ( ONLY SERIOUS INQUIRY PLS),THANK YOU.
marcosjoao_btu 2022-02-11 22:36:03
href=”{{route(‘imoveis.show’, “$imovel->id-$imovel->slug”)}}”
marcosjoao_btu 2022-02-11 22:36:30
i changed only slug and continuous working
DesolatorMagno 2022-02-11 22:36:52
Yes, as long as you put the right id at the front it will work.
marcosjoao_btu 2022-02-11 22:37:27
think in SEO is it the right methode?
DesolatorMagno 2022-02-11 22:39:16
NO, you are doing it wrong, just read the documentation, i am almost sure there is examples of how to work with slug, and in any case you can just pass the data to the controller and check there for the id and the slug.
marcosjoao_btu 2022-02-11 22:40:24
ok i will search more informations about it
tedjimenezm 2022-02-11 22:53:03
Edifice_Solutions 2022-02-11 18:29:09
Hi,, I’m building a chat system,, I want to create a sound notification at the receiving end when ever a message is sent,,, how can I achieve this thanks,, making use of laravel 7

You need JS, is pretty easy

Devilmaker 2022-02-12 05:43:44
https://youtube.com/shorts/0TLGcZ4JXNo?feature=share
one_and_only_abhi 2022-02-12 07:56:50
Anyone from Madhya Pradesh?
rsabhar 2022-02-12 09:10:08
Hi all,

We are rapidly growing our team and we have current openings at this stage.

1) c, c++
2) nodejs
3) react native
4) Java
5) full stack developer
6) content writer
7) UI/ux designer

We have multiple positions open for Experience range between 3-6 years .

Email your cv to careers@cloudbloom.io

Anchal Prajapati 2022-02-12 10:49:17
I want some codes based on laravel
|