ABD
ABD

Reputation: 889

inserting new values inside an array, inside the controller

I am taking the inputs BlogTitle,BlogBody and sending $BlogData to validation,,,

But how can i insert a new value i.e., BlogUrl which is generated inside the controller so that $BlogData will have those 3 values

$BlogData = Input::only('BlogTitle', 'BlogBody');

How can i do this ?

Upvotes: 1

Views: 35

Answers (1)

Rudi
Rudi

Reputation: 2995

Like this:

$BlogData = Input::only('BlogTitle', 'BlogBody');

$BlogData['BlogUrl'] = 'http://whatever.com';

Upvotes: 1

Related Questions