How do I get a specific item in Laravel blade ?
Example:
$(document).ready(function(){
var id = 1;
$('body').append('{{ $projeto->'+id+'->name}}'
})
<body>
Deve Aparecer aqui o nome do projeto
</body>
How do I get a specific item in Laravel blade ?
Example:
$(document).ready(function(){
var id = 1;
$('body').append('{{ $projeto->'+id+'->name}}'
})
<body>
Deve Aparecer aqui o nome do projeto
</body>
I do not know if I understand very well, but if you want to pass the name of the project that is configured in the Laravel .ENV file just use the helper:
{{config ('app.name', 'Laravel')}}
Insert this anywhere in your view blade
To set the project name, go to the root of the project and open the .ENV file, the first line will be "APP_NAME", if necessary, change this line to whatever you wish and it will automatically appear in your view.
Abc