last day (14 days later) » 

10:19 AM
0
A: Route Parameters not working in laravel

Parth Vora<body> <div class="flex-center position-ref full-height"> <div class="content"> <div class="title m-b-md"> Generate Your Domain Now </div> {!! Form::open(['route'=> ['generatorindex', '??'] , 'method' => 'post']) !!} <...

 
should I use something like ['generatorindex', $inputkeyword->inputkeyword]
 
yes you can.....
 
Now it says Undefined variable: inputkeyword
 
First make sure that $inputkeyword->inputkeyword has some value assigned
 
Where should I pass the value to it ? in the controller file or in view file ?
 
10:19 AM
Check my updated answer
 
I want it to generate a new url with user submitted keyword in form. for example, localhost:8000/generator/keyword1, or localhost:8000/generator/keyword2
Thank you for helping me
 
So, you don't want to save that "inputkeyword" field in database?
 
actually, I want. for using it later in my sitemap.xml
When a user submits the keyword, this system should generate a new url just like : localhost:8000/generate/keyword
Then, I want to show something in that page based on user inputted keyword.
 
so upon submitting, you want then to redirect them to localhost:8000/generate/keyword?
 
And after that, Save that page's content in database ...
@ParthVora yes
 
10:26 AM
and then what, after submitting, will they stay there on the same URL localhost:8000/generate/keyword?
 
look
it's a domain generator
when someone is in homepage
he will see a form which he should enters the keyword
and then, he will go into a new url which I've just mentioned
 
ok, got it
 
and he will see the generated domains
Can you help me please ? I'm waiting to see the answer. Thank you.
 
so, basically you want to a URL having one parameter which will have dyanamic values
last parameter in the url will be the text which was entered in that textfield.

so if I write xyz in the textfield, submit the form, I should redirect to localhost:8000/generate/xyz.

Am i right?
 
yes exactly
 
10:32 AM
let me think
 
allright
Here is an example maybe it helps you.
<form action="mostafa" method="post">
<input type="hidden" name="_token" value="{!! csrf_token() !!}">
<input dir="ltr" type="text" name="id" placeholder="id">
<button type="submit">send</button>
</form>
Route::resource('/mostafa','UserController@mostafa');
Route::resource('/mostafa2/{id}','UserController@mostafa2');
public function mostafa(Request $request)
{
$idfrom = $request->input('id');
if(isset($idfrom) && !empty($idfrom))
{
return $idfrom;
}
return view('user.mostafa');

}

public function mostafa2($id)
{
$getId = $id;
if (isset($getId) && !empty($getId))
{
return $getId;
}
}
 
found a way
let me update ans
 
wow
great
 
10:51 AM
do you have an skype ID or telegram or other apps so I can contact you directly ?
 
Why, do you want more help?
 
yes, and maybe working together ...
 
Do you mean freelancing?
 
yes
 
Yes, actually I'm currently trying to find. I'm only interested for Laravel and would be good if its from the scratch.
 
11:02 AM
So please contact me in telegram : my telegram ID : @mostafagram
 
I don't have interested account. Can we use Skype instead?
 
yes , skype id : mostafa.safarian
 
ok, will contact you as soon as I get free
 
thanks
 
bye for now
Thanks
 
11:16 AM
are you there ?
 
11:32 AM
can you add it: xparthxvorax
on Skype
 
I don't have skype on this PC at work. I will add you on my home PC
How can I return just the inputkeyword in generatorindexurl
done
I've fixed it
 
 
2 hours later…
1:36 PM
ok fine
 

last day (14 days later) »