Skip to content
Advertisement

Getting “Class ‘appHttpControllersController’ not found” in Laravel 5.1

I’m quite new to Laravel and when I am going through a tutorial when I encountered this error. This is my code in ‘testController.php’. And this is my ‘routes.php’. I am getting this error: Class ‘appHttpControllersController’ not found How can I fix this error? Answer Let’s go through this step by step. 1. Check autoload directive on composer.json Open composer.json

PHP Loop inside array

How can I loop inside an array in my code? This is the static version of my script: Then, I need to retrieve the value and label from the database. So I customized my previous code to: When I run it I get this Error message: Parse error: syntax error, unexpected ‘while’ (T_WHILE), expecting ‘)’ Can anyone help me? I

Upload a ZIP file and UNZIP ftp folder via PHP

I want to make a form where you can fill FTP login server and get option to upload ZIP file. The script works apart from the last part (UNZIP the file) I want to perform UNZIP uploaded file. Does anyone know what is the problem? TIA THE ERROR Successfully uploaded ftp://:@ftp.***.com/htdocs/file.zip Warning: ZipArchive::extractTo(): Invalid or uninitialized Zip object in C:xampphtdocsupload.php

Allow any option passed to Symfony CLI

The goal is to allow any options to be passed to symfony CLI, rather than limiting to a defined set of allowed options. For instance: In this example, foo is an option which is not explicitly allowed by the symfony application. My console app is proxying to a different application with a number of CLI options. I do not want

Check For Existing Table Using variable

I was wondering how to incorporate a variable into a PHP statement to check if a table exists. For some reason the query does not accept the variable. Here is what I have: Answer The statement needed a tilde around the variable. Here is the final statement: $query101 = “select 1 from `$id` LIMIT 1”;

How do i pass csrf token with this file upload

I have this html: And this jquery plugin to upload file: And the route under web middleware group: And whenever i try to upload the file i got the familiar error: TokenMismatchException in VerifyCsrfToken.php Answer First add this code on your form <input type=”hidden” id=”csrf_token” name=”_token” value=”{{ csrf_token() }}”> this adds a csrf token field on your form using laravel’s

Advertisement