laravel-blade Questions

9

Solved

I am trying to create a HTML widget with Laravel blade similar to the following (widget.blade.php): @push('scripts') <script src="{{ asset('js/foo.js') }}"></script> <script> ...
Veer asked 1/7, 2016 at 0:53

3

Solved

Using Laravel 5.1, I am trying to create a menu list from a MySQL categories table. My service provider returns data, but I don't understand how to create the child categories in a foreach loop. Wh...
Rootlet asked 20/8, 2015 at 15:52

8

Solved

I am trying to fill my webpage with content based on content stored in a database. However, I would like to skip the first item; I want to start looping from the second item. How can I achieve thi...
Poltroon asked 11/8, 2016 at 12:21

5

It is a doubt that I have tried to solve on my own using different methods, but none has given me the expected result. The problem comes when I save a variable of type text in the database of my p...
Pozzy asked 6/6, 2018 at 7:38

7

I'm building a small CMS in Laravel and I tried to show the content (which is stored in the DB). It is showing the HTML tags instead of executing them. Its like there is an auto html_entity_decode ...
Diva asked 24/9, 2014 at 18:21

6

Solved

I have a loop like this: @foreach($data as $d) @if(condition==true) {{$d}} // Here I want to break the loop in above condition true. @endif @endforeach I want to break the loop after data di...
Wanting asked 19/7, 2017 at 11:43

5

Solved

I am trying to set up a site using laravel, but I'm really having trouble with basic things that the documentation just doesn't cover. In this case, I see that it says I can include one view insid...
Yorgo asked 13/2, 2014 at 12:13

8

I'm completely new to Laravel, MVC and templating engines in general. I need to show certain navbar buttons and options if a user is logged in such as: Notifications, Logout, Profile, etc... and a...
Carranza asked 29/3, 2015 at 18:43

6

Solved

I am using Laravel 4 and blade templates, and running into an issue when I try and extend a template. In my layout I have @yield('content') and in my page I have @section('content') Welcome ...
Gape asked 15/10, 2013 at 10:36

13

Solved

I am developing a Laravel(5.2.29) project in Windows environment and testing it on Chrome browser. I have made some changes on a Blade file using atom text editor and then refreshed my page and not...
Fougere asked 28/5, 2016 at 20:50

7

I'm starting with Laravel and I'm using Illuminate/Html for making forms. I want to add disabled attribute to the first option and I dont find the way to do it. {!! Form::open(['url' => 'shelt...
Cardoza asked 21/4, 2015 at 11:31

2

Solved

Context I am new to Vite and with very little experience in Laravel, I am trying to use Vite with Laravel for asset bundling. I'm following instructions from Laravel official documentation : https:...
Africah asked 9/3, 2023 at 13:59

5

Solved

I didn't deal with render method yet !! is it for blade template ? I have to pass dynamic data in blade.php file dynamically.
Flat asked 12/6, 2016 at 9:41

4

Solved

I am just doing my very first steps with Laravel 8 and found a problem that I can not solve. /var/www/html/laravel/resources/views/dashboard.blade.php: <div class="py-12"> <div...
Greeson asked 22/11, 2020 at 12:37

7

Solved

This is simple but I can't seem to be able to do it with blade and I usually go back to php for this but, since I can't declare a new php variable with blade (without printing it, that is) how shou...
Etra asked 30/4, 2014 at 8:11

7

I am trying to use it in my layout and I'm suddenly bump-up with the idea of using the new features of Laravel 5.4 @slot. Just wondering if passing an array to a slot possible? @section('SampleS...
Michaeline asked 28/1, 2017 at 11:17

3

Solved

I have made a laravel component using php artisan make:component testcomponent for which two files are created; one is blade and second one is php class file. here is the blade file: <div> {...
Rembrandt asked 11/3, 2022 at 8:1

3

Solved

Is there any way to sort @foreach loop in laravel blade? @foreach ($specialist as $key) <option value="{{$key->specialist_id}}"> {{$key->description}}</option> @endforeach I ...
Sheeb asked 10/1, 2016 at 0:12

5

Solved

I am getting an error while trying to display data from the database.This problem occurred by other people who have created posts on this website. but they have a foreach loop and I don't. so all t...
Upbeat asked 27/2, 2019 at 13:8

10

is there any ways that JavaScript can get the variable from the controller in a Laravel Blade template? Example: I have the code below: $langs = Language::all(); return View::make('NAATIMockTest.Ad...
Lid asked 6/5, 2015 at 10:27

13

I'm trying to get a url parameter from a view file. I have this url: http://locahost:8000/example?a=10 and a view file named example.blade.php. From the controller I can get the parameter a wi...
Escobar asked 9/7, 2015 at 17:51

1

I learned I can create components for Blade in Laravel 9 in two ways: @component('components.myComponent') @endcomponent and also <x-myComponent/> What method is preferred?
Elinaelinor asked 27/11, 2022 at 0:52

14

I have installed some Visual Studio Code extensions to handle Laravel Blade Code like KTamas.laravel-blade onecentlin.laravel-blade But they are not helping me to format Laravel Blade Code [blade...
Kibler asked 17/9, 2017 at 19:44

6

Solved

I want to show the old input in input value. If there isn't old input, than show other variable: value="{{ old('salary_' . $employee->id) or 'Default' }}" But when there is no old input, it g...
Tympanites asked 11/11, 2015 at 14:36

30

I am using Laravel 4. I would like to access the current URL inside an @if condition in a view using the Laravel's Blade templating engine but I don't know how to do it. I know that it can be done...
Showiness asked 11/7, 2013 at 10:36

© 2022 - 2024 — McMap. All rights reserved.