I want to run my code via command where i placed a file in folder app/public/results
And i want to access this file with this code:
if ( ! File::exists(storage_path('/app/public/examResult/' . $this->argument('file'))) ) {dd('Not found this file!');}
But its printing not found this file.
Where are these files actually stored where code can find them ?
Iam trying to delete an image file but its giving error that call to a member function delete() on string.
This is my code:
public function destroy($id) { $element = Element::find($id); $destination = 'public/images/'.$element->imagen; if(File::exists($destination)){ File::delete($destination); } $destination->delete(); return redirect()->route('elements.index'); } }
I've recently upgraded to Laravel 11.
One of the steps in the upgrade guide is to publish telescope migrations since telescope doesn't load them automatically any more.
The problem is, if I add telescope migration to my codebase, it runs on production deploys. Those tables shouldn't be on production database.
How to you manage this situation?
What is the difference between self::
, static::
, and $this->
?
How do I test my PHP application (PHPUnit, Pest) ? Which is best to use and how do we get started with it in an application ?
What are the points we should remember while working on APIs ?
What’s the best way to optimize Laravel for high traffic?
When should I use pluck()
, select()
, or get()in Laravel ?
Can someone explain the differences between hasOne and belongsTo ? Also any good strategies for visualising Eloquent relationships to help me understand the data model?
And what's your go-to approach for debugging N+1 query issues in Laravel?
Hello Everyone, I'm Paramjeet
Skill Level: Level-Medium
Phone: 90389043
Bio: Testng morein dsfm ls hj
Hello Everyone, I'm Christian
Coding Standards Best Practices: Expert
Server Configuration:** Expert
Frontend with PHP: Expert
Object Oriented Programming: Expert
What is the 'correct' folder structure for a PHP project (without a big framework like Laravel yet)? Where should I put my database connection file, helper functions, classes, and HTML views? Also, how should I name my files, functions, and variables (camelCase, snake_case)? I see so many different examples online.
© 2025 by CodeBloom Education Ltd