Support the ongoing development of Laravel.io →
Input Database Eloquent
Last updated 2 years ago.
0

What happens when you print it?

dd(Input:get('link'));

If it's still empty, check your html.

Last updated 2 years ago.
0

Try this.

$work = new Work;
$work->title = Input::get('title');
$work->link = Input::get('link');
$work->type = Input::get('type');
$work->content = Input::get('content');
$work->date_posted = date('Y-m-d H:i:s');
$work->save();
Last updated 2 years ago.
0

dd(Input::get('link')); gave me the expected result:

string(9) "test-link"

Using your method CleverCookie works... Why o.O?

Did I forget something into my model?

Thanks to us!

Last updated 2 years ago.
0

It may be as you said, that you can't use 'link' as a key, but I'm not entirely sure.

I never use the create() method, the answer I posted is just the way I create models and I have not had any problems.

This may be an issue that needs reporting, so If anyone else thinks it is or knows why his original code is not working, feel free to enlighten us.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.