function showProjects()
{
$.post("<?php echo e(route('show.front.profile.projects', $user->id)); ?> ) ", {user_id: <?php echo e($user - > id); ?>, _method: 'POST', _token: '<?php echo e(csrf_token()); ?>'})
.done(function (response) {
$('#projects_div').html(response);
});
}
Asked
Active
Viewed 482 times
-2

Mat
- 202,337
- 40
- 393
- 406

ahmmad zayeem
- 1
- 2
-
Please go through https://stackoverflow.com/help/how-to-ask before asking question. There is lack of introduction to your problem or information what you tried. – mlykotom Jan 21 '19 at 20:25
-
You need to provide more background of the problem - is the function a PHP function? or is it javascript function inside blade? Just briefly looking at the code, it looks like problem with `echo e($user - > id);` which is wrongly having spaces. Also check https://laravel.com/docs/5.7/blade#php for other options how to have code in blade. – mlykotom Jan 21 '19 at 20:26
-
Possible duplicate of [PHP parse/syntax errors; and how to solve them?](https://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – ceejayoz Jan 22 '19 at 01:50
-
(I'd bet it's the `- >` bit...) – ceejayoz Jan 22 '19 at 01:51
1 Answers
0
Check the related view, I'm assuming the spaces in this $user - > id
should be removed to become $user->id
.

Elliot
- 1,457
- 13
- 40