I have a relation that I cant figure out my current application looks like this Models Tables Now a tournament can have just some of the users participate in the tournament so I’ve created the below To store users that are participating in a tournament from the team. How should this look in terms of elo…
Tag: laravel
Show.blade.php is not displaying the content from the database, only the layout
`i am having a problem with my show.blade.php template, everything works fine but when I click on a post in the index page it directs me to the /post/1 page without showing the post content only the …
Datatables: how to preserve id when sorting through a relation from another table (yajra, laravel)
I’m using datatables from yajra datatables and I have a problem. I have a datatable where I obtain certain columns from other tables, for example the column “customer” is obtained through a relation from another table But when I press the sort by customer button, the IDs change to the ID of …
Trying to use string as foreign key in laravel
I am just a beginner and trying to use string as foreign key in laravel but getting this error while fetching the data:- SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘read’ in ‘where clause’ (SQL: select from as sender_id, count(from) as messages_count from messages where to …
Laravel 8 Does Not Show Data From DB
I’m working with Laravel 8 and I have made a resource Controller to return some results from MySQL table so index() method of this Controller holds: At at index.blade.php I added this: So as you can see, it look fine but the problem is it does not show me any output! I mean no results and no errors at a…
Crud Destroy isnt Destroying [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 1 year ago. Improve this question Im doing my first CRUD(Vue-Laravel) and im getting an error in the bac…
How to attach when enter a text in laravel?
After login a user, The user enters this skills form, selects the skills. A user can enter multiple skills, and save in database. The field of name skill_name level And in table skill_name level user_id I don’t know if the skills and skill_user table should be, or not, I don’t know. What would you…
Dompdf-Laravel Unicode character not rendering correctly
I am using barryvdh/laravel-dompdf to load PDF’s in my laravel application. I need to load custom unicode fonts(sinhala) in to the pdf. To do this, I downloaded my external fonts and copied the font folder and then it load to storage/fonts directory by load_font.php. I have used css in my blade file as …
How to query data in `ranges` between range where ranges are saved in DB in single column separated by `-`?
I have following table ranges PHP Code Expected output: I expect id 1 and 2 in results between 0-550. Thanks Answer The design of your table is poor, and the lower and upper bounds of the range should be stored in separate columns (more on this later). If are really stuck with the current design, you could us…
Laravel Echo Listener not working on frontend
I have created an event: Here is the bootstrap.js: and the route: laravel-echo-server.json : ENV file: When I set the broadcast driver to log: When I set the broadcast driver to redis & monitor redis via CLI: It looks like everything works fine, but the browser console in frontend doesn’t show any l…