Questions tagged [laravel-5.4]

1

votes
1

answer
4.2k

Views

Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() error laravel 5.4

I am uploading a laravel 5.4 project to cpanel server. And i am serve with PHP Fatal error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() on server. I have done composer require symfony/polyfill-iconv However, it does not change the error message. What thing i might miss out?
Brian Ruchiadi
1

votes
1

answer
1k

Views

Laravel 5.4: Password reset token custom length?

I am using laravel 5.4 building an API where I email the user a token on password reset if user verified, which user provides before resetting password. Currently the sent token has 64 characters and too large for user to grab, and I'm not sure if laravel has configuration to give a custom length to...
blazR
1

votes
0

answer
116

Views

How to do Transaction begin and commit in different methods of different classes?

For e.g. A.php class A{ public function abc(){ DB::beginTransaction(); $result = Model::save(); } } B.php class B{ public function cde(){ DB::commit(); //or DB::rollback; } } These are two classes from different files. Steps : $a->abc() first will get called then payment operation then $b->cde() w...
Rahul Meshram
1

votes
0

answer
171

Views

Laravel File Manager dosn't load css, js files

I integrated Laravel File Manager in my laravel project and at first it worked properly, but after I remove public [ I followed this instruction remvove public from url ] from url it din't work anymore. The css file is missing and browse file also din't work. I tried to include those files**[css, js...
Doo Doo
1

votes
1

answer
232

Views

Laravel 5.4 Session removing variable on page reload

class LoginController extends Controller { public function processLogin(LoginRequest $request) { $email = $request->get('email', ''); $password = $request->get('password', ''); $token = $this->_loginService->processLoginAttempt($email, $password); Session::put('access_token', $token); Session::save(...
Tanaka
1

votes
1

answer
290

Views

sending mail using Amazon SES and display stats of mail using Laravel 5.4

I want to setup SES for sending mails in bulk using Laravel 5.4 and I want to see it's stats like soft bounce, hard bounce, clicks, opens, etc information and display this information in my admin panel. I read some docs of amazon and it's not up to mark so can anyone please help me to get nice tutor...
user3886556
1

votes
0

answer
112

Views

Family Tree make center and responsive

Hello everyone I need your help to center screen and responsive this family tree. Please see the link below. Thank you. My Code Is As Follow /*Now the CSS*/ * {margin: 0; padding: 0;} .tree ul { padding-top: 20px; position: relative; transition: all 0.5s; -webkit-transition: all 0.5s; -moz-tr...
Octeza Jonathan H
1

votes
0

answer
214

Views

Laravel Barryvdh Dompdf : Page is not working http 500 error

I have I have installed 'barryvdh/laravel-dompdf' using composer and added lines in providers and alias array in config.php Barryvdh\DomPDF\ServiceProvider::class, and 'PDF' => Barryvdh\DomPDF\Facade::class, And created controller and functions and for download files.Its working fine and download p...
Rajkumar Nandi
1

votes
0

answer
673

Views

Laravel $request doesn't contain some input-array form fields

I have a form in laravel 5.4 allowing people to create questionnaires - adding question fields dynamically (this is handled elsewhere in js). {{ csrf_field() }} Featured Image Title Description Skill Level Kids Beginner Intermediate Advanced Add contributor Contributor 1 Remove Contributor Category...
rushtoni88
1

votes
0

answer
127

Views

Laravel Eloquent rollback does not work, for queries separated by PHP functions

I separate the model queries on a trait class, because I hate to read a long block of codes with the model queries, and because I find it convenient if I reused the same function. But I found a problem once an error occur. I was trying to run rollback function from eloquent once an error occur but,...
BONIX SULOD
1

votes
0

answer
43

Views

validate() function redirect in chrome browser not showing any validation errors (more than 3 errors)

Laravel 5.4 version The validate() function works until I test more than 3 errors in the form. Upon automatic redirect after buildfailedvalidationresponse function, the 4 $error messages aren't present on and neither is the old form data. This only doesn't work in chrome. Firefox/internet explorer i...
Drizzle53
1

votes
0

answer
99

Views

Laravel Eloquent Inner Join Query with dynamic Multiple conditions in Where Clause

In the following Eloquent Query Example, as we can see, I am trying to add condition in where clause only if its value is received in $request data. I am getting error for writing if in between of the Eloquent query for checking isset. Is there a way to add conditions dynamically only if it is set?...
Vrajesh Doshi
1

votes
2

answer
141

Views

How to retain styles within dynamic routes in Laravel 5.4

In the application I built I have a view called main (http://127.0.0.1:8000/main). Following is how I load the view file from Route file, web.php. Route::resources(['/main' => 'pages\MainController']); Above loads the 'main.blade.php' view controller from the index function of MainController.php fi...
Nilaksha Perera
1

votes
1

answer
150

Views

updateOrCreate for polymorphic relation?

Is there a way to use updateOrCreate() or similar method for polymorphic relationship? Problem with using updateOrCreate method I wouldn't know the id in the polymorphic table. Currently doing like this: if ($request->has('meta.description')) { $description = $cat->tags()->where('key', 'description...
I'll-Be-Back
1

votes
0

answer
25

Views

Express Checkout on the behalf of actual merchant

I am working on a marketplace site which have multiple sellers. While implementing paypal integration, seller grant their permissions to third party which includes the scope of express checkout. I have implemented this successfully Though one of the following post I come to know that it is possible...
Diksha
1

votes
3

answer
1.1k

Views

How to Change Route File Location In Laravel 5.4?

I will try to change my route file location but its ganerate error so i'm reset all my project code when its compalet reset but after its genrate this error. so how to fix this error. RouteServicveProvider.php
Chirag_php
1

votes
1

answer
42

Views

Laravel: whereHas() with complex conditions

I have two models let's say, Block and Slot with their respective table structure as:- blocks(id, name); slots(id, block_id, time, status); slots.status may have values as 0 for available or 1 for booked. The problem is, I want to return those blocks only whose status count 1 vs the total slots coun...
Dipendra Gurung
1

votes
1

answer
141

Views

laravel api url on production server

I am using laravel 5.5 and my API URL is http://127.0.0.1:8000/api/getService/ for GET method. what will be the URL if I put my files on the server in folder role. I am trying this URL http://xx.xxx.xx.xxx/role/api/public/api/roles/ but getting the 404 error
Durgesh Pandey
1

votes
0

answer
110

Views

Laravel 5.4 NotificationSent vs MessageSending Events

I am a little confused about MessageSending and NotificationSent events. in my application, I want to save any notification and mail send by the app inside a database Table. for that, I create two event listeners createNotificationLogOnSending and createNotificationLogOnSendingMessage. 1) createNot...
Thamer belfkih
1

votes
1

answer
140

Views

Update pivot table in Laravel 5.4 [duplicate]

This question already has an answer here: getting the value of an extra pivot table column laravel 2 answers I have two models: Event and Ticket. I assigned between them Many-To-Many relationship: Here it is: Ticket model: public function events() { return $this->belongsToMany('App\Event'); } Even...
1

votes
2

answer
126

Views

Method not allowed exception on form tag

I'm new to Laravel and creating an ecomm website using laravel Shopping cart library and Laravelcollective 5.4. I'm currently stuck on Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException which appears on a single delete button but if we create another delete button the secon...
Hassaan Ali
1

votes
1

answer
369

Views

Validate datetime-local input

According to MDN, I should use datetime-local type for a date and a time input: I can validate a date in laravel with this code (in a controller): $this->validate($request, ['my_date' => 'required|date']); But is there a way to validate a datetime-local?
rap-2-h
1

votes
1

answer
363

Views

Laragon, laravel symbolyc link does not work

I'm using laravel with laragon, everything works fine exept that when I upload images they return 404 , and public/storage is empty however storage/app/public has the files , also public/public has the files , so it creates a wrong folder public inside the public folder, I did run the php artisan st...
Mikail G.
1

votes
0

answer
193

Views

Laravel-echo-server connection refused on first request

I have a problem with laravel-echo-server. When I load my site the first request over myapp.dev/socket.io/ fails with the error net::ERR_CONNECTION_REFUSED After this request follow 3 more and these pass. If i try to send the same request that fails via curl it passes and on my local machine everyth...
Daniel
1

votes
1

answer
346

Views

Laravel flash message after login does not displayed in home route

First of all, I checked out this question: Flash message after login laravel, but it does not solve my issue. I am trying to generate session flash message after successful login, by overriding authenticated method of AuthenticatesUsers Trait like the following: // in LoginController ... use Illumin...
SaidbakR
1

votes
0

answer
293

Views

Laravel 5.4 : SQLSTATE[HY000] [2002] No such file or directory

I know there is a lot of topics on this error but it seems that I already try almost everything and it doesn't work at all. So I've set up my .env file like this: APP_NAME=Neuralia APP_ENV=local APP_KEY=(key) APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://127.0.0.1:8000 DB_CONNECTION=mysql DB_HO...
Amaury Leproux
1

votes
0

answer
342

Views

laravel 5: dynamic url with sw-precache

Im trying to adapt offline first functionality to my laravel 5.4 app.everything works fine up until the point that i need to cache my blade files more specifically i have a problem with url's that include a wildcard.I tried a couple of ways but nothing works/this is my webpack.mix.js function that t...
kristi tanellari
1

votes
1

answer
50

Views

Change, error response displays a single error message in Laravel 5.4

I am using required_without validation for required any one field. return Validator::make($data, [ 'user_email' => 'required_without:user_phone|email', 'user_phone' => 'required_without:user_email|min:10', 'country_code' => 'required_with:user_phone', 'otp' => 'required|numeric|max:6', ])...
Kanu Patel
1

votes
0

answer
35

Views

bootstrap-wysihtml5 changing iframe src

I want to use Youtube abd Vimeo iframe code in wysihtml5 editor. I have used ('#answer').wysihtml5(); and $('#answer').wysihtml5({ toolbar: { 'font-styles': true, // Font styling, e.g. h1, h2, etc. 'emphasis': true, // Italics, bold, etc. 'lists': true, // (Un)ordered lists, e.g. Bullets, Numbers....
Jass
1

votes
0

answer
28

Views

Undefined variable: workschedules

This is the code from WorkScheduleController: public function index() { $workschedules = WorkSchedule::latest()->paginate(20); return view('Admin.inspection-register.all', compact('workschedules')); } And this is the code that I'm writing to the Admin.inspection-register.all.php @foreach($workschedu...
1

votes
1

answer
234

Views

Laravel parent model deletion doesn't fire up child model deleting event

I'm using laravel 5.4. I have a project model as parent and project_images model as child and here is the child model: Schema::create('project_images', function (Blueprint $table) { $table->increments('id'); $table->integer('project_id')->unsigned(); $table->foreign('project_id')->references('id')->...
Ali
1

votes
0

answer
41

Views

Laravel Excel Img src not working from storage

I'm trying to export excel with images but I have this error. (1/1) PHPExcel_Exception File http://127.0.0.1:8000/storage/photos/3x1HVvwYYNXAZxc/1.jpg not found! When I press the link it shows the photo. My controller: public function WholeSaleStockExport(Request $request, BidFilters $filters) { Exc...
Dmitry Malys
1

votes
0

answer
159

Views

(1/1) ReflectionException Class App\Http\Controllers\AdminController does not exist Laravel 5.4

I am doing MultiAuth in laravel 5.4 I create two tables one for users and the seonde for admins the authentification for usres works fine but when the admin login in it show me this error : (1/1) ReflectionException Class App\Http\Controllers\AdminController does not exist i don't know what is the r...
toto01
1

votes
0

answer
106

Views

Type error: Argument 1 passed to App\Http\Controllers\Auth\RegisterController::register() must be of the type array, object given

What is this error? Type error: Argument 1 passed to App\Http\Controllers\Auth\RegisterController::register() must be of the type array, object given public function register(array $data, Request $request) { if ($request->hasFile('image')) { $fileNameWithExt = $request->file('image')->getClientOrigi...
1

votes
2

answer
95

Views

Switching user in laravel 5.4

I am switching users in laravel and I succeeded in that as well but the thing is when I redirect user to dashboard after successful login it redirects to login form instead I don't know what am I doing wrong. Here is the code I am using. public function user_reauthenticate(Request $request) { $input...
Mohsin Abbas
1

votes
1

answer
30

Views

Laravel 5.4 : Display mulitple rows randomly after clicking a button

I have a table questions and a table question_options in my database and I want when the user clicks on the button play he will see a random question from the database to answer it, then press the next button and an another question must appear to him, although each question should appear in a 30 se...
toto01
1

votes
1

answer
669

Views

Undefined property: Illuminate\Database\Eloquent\Relations\HasMany::$id

I'm stuck with this relationship error: Undefined property: Illuminate\Database\Eloquent\Relations\HasMany::$id Am i missing something? Here's my code: User.php public function schools(){ return $this->hasMany('App\SchoolsList'); } SchoolsList.php public function user() { return $this->belongsTo(Use...
1

votes
0

answer
67

Views

Persistent connection of laravel queue workers?

When using database as queue driver for Laravel, does this mean that the queue workers are persistently connected to the database? Been trying to figure out the high database connections even when we only have few users in our site. Thanks for the help!
yunayuna
1

votes
2

answer
336

Views

Fatal Error Class 'App\Http\Controllers\Controller' not found Laravel 5.4

I tried to route with using name . I already tried to solve with using Composer update , Clear Cache , Generate App key. But it's showing fatal error . Error View Message : (1/1) FatalErrorException Class 'App\Http\Controllers\Controller' not found in ClassesController.php line 13 My Route Code Bel...
Ripon Uddin
1

votes
0

answer
271

Views

The file “C:\xampp\tmp\php8911.tmp” does not exist

I after install composer require intervention/image I want to upload image and after submit a form, I get this error. The file 'C:\xampp\tmp\php1D5F.tmp' does not exist public function store(ArticleRequest $request) { auth()->loginUsingId(1); $imagesUrl = $this->uploadImages($request->file('images'...

View additional questions