Laravel function name must be a string [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Laravel
What mistake am I actually doing?
Please have a look at the image below:
http://1drv.ms/1ybX4Cg

I think
$body['user_id'] = $user()->id;
should be
$body['user_id'] = $user->id;

Related

Undefined variable $task [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 9 days ago.
Improve this question
enter image description here
enter image description here
I don't understand why it shows me that variable is defined. I followed video tutorial but can't understand why it works in video but not for me.
Need help to understand this. Feels like simple mistake but I can't find the solution.

Why PHP cannot execute the echo "<?"? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
Can some of you tell me please why when I echo "<?", the <? is not displayed?
I'm sorry, maybe it's very stupid question, but I need to dig this language more deeper.
If you view the source it will be there. Its because the browser thinks its a tag.
Fix it by using htmlentities().
echo htmlentities("<?");

How to remove a key of an array? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I need to remove [picture_names] from my array. Help me to remove this?
Use unset function:
unset($array['picture_names']);
You can do it with unset() function. Documentation here.
$result = unset($yourArray['picture_names']);
var_dump($result);

FatalErrorException in HomeController.php line 69: Class 'app\User' not found [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I'm new in laravel 5.1. can you help me solving this error?
This is my code
You should refer to the User model like this:
$datas = \App\User::paginate(5);

Echo not displaying the whole string [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have this code.
<?php echo "".$row['pname']."";?></h4>
When I click on the link,Its only posting the first word of the string,the rest are ignored
Missing the quotes for href attribute -
echo "<a href='pvendors.php?post=".$par."'>".$row['pname']."</a>";

Categories