All Questions
53 questions
0
votes
1
answer
32
views
Property [nama_guru] does not exist on this collection instance
I’m working on a feature to display teacher data grouped by category (guru_category). Below is the code I’m using:
public function showGuru(Request $request)
{
$search = $request->input('search'...
1
vote
2
answers
41
views
groupBy in Controller Index function
I have data that I'm trying to groupBy a field on index function
public function index()
{
abort_if(Gate::denies('workstep_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');
$...
0
votes
2
answers
216
views
php checking if null with @if inside @foreach loop
I'm tring to check if null with @if for data in show.blade
<li id="step6"><strong>Schritt 6<br>@foreach($dbQuery as $query){{$query->sixth_step}}@endforeach</strong&...
0
votes
2
answers
680
views
How to show Products attributes on blade file (color, size etc.) in Laravel?
This is Ahmad Raza.
I'm working on E-commerce Project. I am trying to get product attributes on Product details page where user can select attributes before adding to cart.
I have two color attributes ...
1
vote
3
answers
671
views
Laravel 9 throw custom error view if DB connection fails?
what i am trying to do is if the connection to the database fails, instead of getting No connection could be made because the target machine actively refused it, i want to throw a custom view that ...
-3
votes
2
answers
526
views
Displaying data from different tables in Laravel in a single view
In the view im trying do display two rows from tables 'categories' and 'suppliers'
categories->category_name and suppliers->company.
The problem is that in each row od displayed data i should ...
1
vote
1
answer
331
views
how to use condition in 2 tables using with relation in laravel 8
I have two tables name is courses and admissions. Now i want to set if user purchase the course then show admitted else show course price. please check the below code:
$courses = Course::orderby('id',...
-1
votes
1
answer
217
views
How do you get your data to show in your browser once using Laravel php blade? [closed]
I have my table showing the browser with my information and have it iterating over 17 randomly generated items. However, It iterates over them 17 times in separate chunks. I wish to know how to tell ...
0
votes
2
answers
234
views
Laravel - Fetch data from other table column from linked key column
I have 2 tables. (1) being users, and (2) being foods.
In the [users] table, there is a food_id bracket that is linked as a foreign key to an item/column's id in the other table [foods]. I want to be ...
-2
votes
2
answers
67
views
Images from database not showing on Blade view
<td>
<img src="{{ asset('storage/'.$a->image) }}" alt="{{ $a->image }}" class="img-fluid" width="50%">
</td>
And I'm facing this ...
0
votes
1
answer
5k
views
how to fetch image from storage folder to blade in laravel 8?
I am facing an error while showing back image stored in storage folder in laravel.
so here is my code of storing image in storage folder :
public function store(Request $request)
{
$data = $...
-1
votes
5
answers
1k
views
Laravel Blade Foreach only shows 10 items
This loads 12 Candidates from the database.
$candidates = Candidate::all()->where('vacancy_id', $id);
doing count($candidates) returns 12
however in my foreach loop. such as
$sum = 0;
@foreach($...
1
vote
0
answers
142
views
Is there any way to perform string_replace function before laravel compiles view?
I have an website that that uses mass scraping of a database and a CRM to perform the task, Few days ago all the crawl website moved to another website link. I just need to perform string replace task ...
-2
votes
2
answers
63
views
How to solve the problem of writing data to the database?
I created a page where you can add records to a database, and when I add a record I get an error:
SQLSTATE[HY000]: General error: 1364 Field 'website' doesn't have a default value (SQL: insert into ...
0
votes
1
answer
7k
views
Attempt to read property "slug" on bool
I have problem with display data from DB, i take it from database but display doesn't work. My model is empty. Thanks
Route web.php
Route::get('/turnaje/{slug}', [RegionController::class, 'show']);
...