laravel-blade Questions

2

Solved

I have a few blade template files which I want to include in my view dynamically based on the permissions of current user stored in session. Below is the code I've written: @foreach (Config::get(...
Toplevel asked 15/1, 2015 at 12:5

4

Solved

Laravel 5 provides translations using the @lang helper <!-- file: template.blade.php --> @lang('some text') Laravel 5 also has the possibility to pluralize strings depending on a variable. /...
Riegel asked 3/9, 2018 at 10:18

7

1st question: I've inserted the localization in many types of texts and things, but I don't know how to import it into in the following forms: {{ Form::label('name', 'here') }} {{ Form::text('...
Worthington asked 13/8, 2013 at 23:10

4

Solved

I have this jquery $(".waitingTime .button").click(function () { alert("Ema"); }); I have a a tag like this: <a href="{{ URL::to('restaurants/20') }}"></a> Can I do the same hre...
Personable asked 22/6, 2014 at 17:22

5

Solved

I developed an API to show a pop up message when the page loaded. Not all the pages use the pop up API. For example, if the user go to the show($id) page, that doesn't required the pop up api to f...
Memorial asked 1/8, 2014 at 10:41

4

Solved

I know that naming conventions in Laravel is covered in another question, but blade files are not covered there. I read several blogs and forums and they all offer different approach so I wan...
Prying asked 14/5, 2020 at 22:29

6

Solved

If you do this you get an error: <p>@if($foo)@if($bar)test@endif@endif</p> And if you do this, you get <p> test </p>, adding too much whitepace: <p>@if($foo) @if($bar...
Whet asked 1/10, 2014 at 16:27

7

Solved

In my Laravel project I'm trying to load an image into my view using blade but it displays as a broken link. I inspect it with firebug and the src is pointing to the image but nothing is displaying...
Unsociable asked 18/1, 2015 at 5:29

24

Solved

I would like to create helper functions to avoid repeating code between views in Laravel. For example: view.blade.php <p>Foo Formated text: {{ fooFormatText($text) }}</p> They're basic...
Solipsism asked 3/2, 2015 at 2:25

4

Solved

Basically, I've a simple 'exp' column in my database and I want to use a function 'showLevel()' where I can pass in Auth::user->username as the argument instead of a static name. I'm struggling ...
Mcilwain asked 27/6, 2015 at 16:0

1

Solved

I am attempting to integrate Laravel 11 with React.js for data retrieval and transmission between the two. However, I cannot locate the routes/api.php file in the latest version of Laravel. I have ...
Cabbageworm asked 19/3 at 16:24

12

Solved

I have the need to insert a comment inside a vue.js file for future references, but I don't find how you do this in the docs. I have tried //, /**/, {{-- --}}, and {# #}, but none of them seem to ...
Idolla asked 19/12, 2016 at 18:32

14

I develop on a Mac locally. Latest version of Big Sur. Today I went to deploy my app to production via an Ubuntu server through Forge, and got greeted with an error I've never seen before, an...
Leodora asked 4/12, 2020 at 9:4

4

Solved

So i'm trying to code a simple website form. But it has this htmlspecialchars error. I've tried to make {{ $message }} but it didn't work. has the same error. this is my controller : <?php n...
Rivas asked 12/2, 2019 at 8:2

21

Solved

I have a string returned to one of my views, like this: $text = '<p><strong>Lorem</strong> ipsum dolor <img src="images/test.jpg"></p>' I'm trying to displa...
Roswell asked 25/3, 2015 at 11:8

8

Solved

I'm learning Laravel (starting at version 5.3) and these two Blade directives look very similar, the only difference I know is that @include injects the parent's variables and can also send other v...
Forest asked 28/1, 2017 at 23:43

11

I installed and configured laravel breeze and blade according to the documentation given by laravel. By default it uses Vite but somehow @vite directive is not working in my project and I don't kno...
Craquelure asked 29/6, 2022 at 9:47

8

Solved

I want to build a blade view from 3 tables: "inputs_details" - fields: article_type (values: 'p' for product,'s' for service), article_id, .... "products" - fields: id, name "services" - fields: ...
Downer asked 12/3, 2015 at 10:46

14

Solved

I am loading my css using this format: <link href="{{ asset('assets/mdi/css/materialdesignicons.min.css') }}" media="all" rel="stylesheet" type="text/css" /> and it loads fine for all http r...
Vipul asked 20/12, 2015 at 4:58

20

Solved

Okay--I know this is a really elementary issue, but I can't figure it out. This is a question regarding Laravel. Basically, I have my stylesheets embedded in my default layout view. I'm currently ...
Misconduct asked 5/3, 2013 at 19:36

16

Solved

Im passing data to my blade view with return View::make('blog', $posts); and in my blade view I'm trying to run an @foreach ($posts as $post) I end up with an error saying that $posts isn't defined...
Brycebryn asked 20/8, 2013 at 17:51

3

I am building a webpage in Laravel 8 using x-components in some places. A component is a modal present in all pages but whose content must change depending on the page invoking it. My idea was the ...
Rupe asked 18/1, 2021 at 11:57

7

Solved

I have a text box that needs to be made readonly; I don't want to use array('disabled' => 'true') because I need PHP to process the field: {{ Form::text('login_token', Worker::generateLoginToke...
Prefabricate asked 10/3, 2015 at 2:23

6

Solved

In the laravel framework we can use blade to add PHP code in html file. We are using both {{ }} and {!! !!} syntax in blade files of Laravel. What is the difference between them?
Tew asked 27/1, 2016 at 7:16

2

Solved

I am working on a Laravel 8 application. I need to use Route::is for multiple routes, like this @if(Route::is('user') or Route::is('register') or Route::is('login')) Do something @endif The goal ...
Feliciafeliciano asked 28/3, 2022 at 11:19

© 2022 - 2024 — McMap. All rights reserved.