I have used Input::file('upfile')->getClientOriginalName()
to retrieve name of uploaded file but gives name with extension like qwe.jpg
.How do I get name without extension like qwe
in laravel.
相关问题
- Laravel Option Select - Default Issue
- Laravel 5.1 MethodNotAllowedHttpException on store
- Laravel - Implicit route model binding with soft d
- laravel : php artisan suddenly stop working
- How to execute MYSQL query in laravel?
相关文章
- laravel create model from custom stub when using p
- send redirect and setting cookie, using laravel 5
- How to send parameters to queues?
- Bcrypt vs Hash in laravel
- Laravel: What's the advantage of using the ass
- How to make public folder as root in Laravel?
- Input file in laravel 5.2?
- What is the difference between Session::set and Se
Get the file name using getClientOriginalName(); then use the explode function to get the name and the image format as shown below:
$image=Input::file('image'); $fullName=$image->getClientOriginalName(); $name=explode('.',$fullName)[0];
Try this:
Or This:
In Laravel 5.2
Use Request and it's already present in the app file in the aliases array
To retrieve original file name
To get file name without extension
here you need to call php PATHINFO_FILENAME
or
On Laravel 5.4 or Lumen 5.4, this may be a useful resource here.