Well can you please show me how to do it?

|
saboorhamedi 2021-02-19 11:48:07
here is the code
saboorhamedi 2021-02-19 11:48:28
folder name, show- show.blade.php
segungreat 2021-02-19 11:48:38
saboorhamedi 2021-02-19 11:48:07
here is the code

What about your route

saboorhamedi 2021-02-19 11:48:48
segungreat 2021-02-19 11:48:38
What about your route

its working fine

segungreat 2021-02-19 11:49:51
saboorhamedi 2021-02-19 11:48:48
its working fine

If the route of the link is working fine then it shouldn’t show 404

saboorhamedi 2021-02-19 11:49:53
show{{$item->}} without slash, take me to the show page, but data is not showing because it looks like this “show1”
saboorhamedi 2021-02-19 11:50:11
segungreat 2021-02-19 11:49:51
If the route of the link is working fine then it shouldn’t show 404

I will show you here

saboorhamedi 2021-02-19 11:52:10
laravel_discuss-70848.jpg
this is without slash, and it work fine
segungreat 2021-02-19 11:52:10
And also why not use named route in place of constructing URL yourself
saboorhamedi 2021-02-19 11:53:22
laravel_discuss-70849.jpg
with slash and id
segungreat 2021-02-19 11:53:41
saboorhamedi 2021-02-19 11:52:10
this is without slash, and it work fine

What’s your route definition in web.php

saboorhamedi 2021-02-19 11:54:39
segungreat 2021-02-19 11:53:41
What’s your route definition in web.php

laravel_discuss-70851.jpg
here

saboorhamedi 2021-02-19 11:55:08
I have say i’m new in laravel,
saboorhamedi 2021-02-19 11:55:34
and I did same as this several times those worked fine, but i dont know is this not working
saboorhamedi 2021-02-19 11:57:25
how is that ?
saboorhamedi 2021-02-19 12:00:07
laravel_discuss-70857.jpg
here is the file
segungreat 2021-02-19 12:00:57
saboorhamedi 2021-02-19 11:54:39
here

You’re getting it wrong

The URL in the view is post/show/your item I’d.

But you have only show in your route file, in won’t work. You need to go through the documentation

segungreat 2021-02-19 12:01:58
saboorhamedi 2021-02-19 11:54:39
here

https://laravel.com/docs/8.x/routing

saboorhamedi 2021-02-19 12:02:32
segungreat 2021-02-19 12:00:57
You’re getting it wrong

The URL in the view is post/show/your item I’d.

But you have only show in your route file, in won’t work. You need to go through the documentation

As I said I’m new in laravel, I might be wrong here somewhere, but posts folder is separate with show folder

saboorhamedi 2021-02-19 12:02:57
segungreat 2021-02-19 12:00:57
You’re getting it wrong

The URL in the view is post/show/your item I’d.

But you have only show in your route file, in won’t work. You need to go through the documentation

well can you please show me how to do it?

Techzsmart 2021-02-19 12:03:03
Hi can anyone help me to create database of a php project please
segungreat 2021-02-19 12:03:47
saboorhamedi 2021-02-19 12:02:57
well can you please show me how to do it?

Go through the documentation

segungreat 2021-02-19 12:03:58
https://laravel.com/docs/8.x/routing
saboorhamedi 2021-02-19 12:04:15
segungreat 2021-02-19 12:03:47
Go through the documentation

can you show me what is wrong with my route /

segungreat 2021-02-19 12:04:30
saboorhamedi 2021-02-19 12:02:32
As I said I’m new in laravel, I might be wrong here somewhere, but posts folder is separate with show folder

It seems you’re coming from codeigniter 3

saboorhamedi 2021-02-19 12:04:53
segungreat 2021-02-19 12:04:30
It seems you’re coming from codeigniter 3

from pure php

saboorhamedi 2021-02-19 12:05:52
still the same
segungreat 2021-02-19 12:09:41
Route::get(‘post’, [YourControllerClass::class, ‘post’]) goes to site.com/post
Route::get(‘post/show’, [YourControllerClass::class, ‘show’]) goes to site.com/post/show
Route::get(‘post/show/{$id}’, [YourControllerClass::class, ‘show’]) goes to site.com/post/show/your-item-id
saboorhamedi 2021-02-19 12:09:42
https://www.youtube.com/watch?v=emyIlJPxZr4&list=PLillGF-RfqbYhQsN5WMXy6VsDMKGadrJ-&index=6

Laravel From Scratch [Part 6] – Fetching Data With EloquentYouTube
In this video I will show you how to start working with Eloquent which is an ORM (Object Relational Mapper) and it makes working with the database models VER…
saboorhamedi 2021-02-19 12:09:55
check this, I did the same
segungreat 2021-02-19 12:10:46
saboorhamedi 2021-02-19 12:09:42
https://www.youtube.com/watch?v=emyIlJPxZr4&list=PLillGF-RfqbYhQsN5WMXy6VsDMKGadrJ-&index=6

Try to use the documentation, it will really help you alot

saboorhamedi 2021-02-19 12:11:02
okay thank you guys
saboorhamedi 2021-02-19 12:11:13
I will search
saboorhamedi 2021-02-19 12:11:31
segungreat 2021-02-19 12:09:41
Route::get(‘post’, [YourControllerClass::class, ‘post’]) goes to site.com/post
Route::get(‘post/show’, [YourControllerClass::class, ‘show’]) goes to site.com/post/show
Route::get(‘post/show/{$id}’, [YourControllerClass::class, ‘show’]) goes to site.com/post/show/your-item-id

this is not working brother

segungreat 2021-02-19 12:15:15
saboorhamedi 2021-02-19 12:11:13
I will search

Yes, it won’t work just and example of how to do the routing

|