πŸš€ DevOps & SRE Certification Program πŸ“… Starting: 1st of Every Month 🀝 +91 8409492687 πŸ” Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

[SOLVED] Error: Access CSS/js file in Local and Laravel-development Server both.

In Laravel, our all assets are in the public directory, But it gives error while we run Same code in Laravel development server and Local Server. See below how

If we are running a Laravel development server then to access the CSS/JS file we need to write only css/layout.css. But if we run the similar code in Local server it shows error.
and, when we are running a Local server, we need to write public/css/layout.css to access the CSS/JS file. But if we run a similar code in Laravel development server it shows error.

So, what should we do to run the code on both Servers?

We write the below code to Access our CSS/JS file:-

{{asset(β€˜_Our-CSS/JS-file-path_’)}}

See the Below image of my code:-

After adding the above code you are able to run your code in both the Servers ( Laravel development server and Local Server ).

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.