0

How to show message if data not found in table in Laravel

Spread the love

suppose if you have some tables in your database and when there is no data in tables you want to show a default message like “No Result Found” to show user that data is not available in database.For Example My Table structure is :

SKILL_NAMESKILL_LEVEL
PHP5
HTML8
JAVA5.5

and you wanna show “No Result Found” if a query doesn’t return any  matching result.For this you can use below code in laravel.You can use the @forelse (https://laravel.com/docs/5.6/blade#loops)

 

Leave a Reply

Your email address will not be published. Required fields are marked *