Category : visual-studio-code

Im trying to upload more than a single file so I try to modify the code a little bit. But everytime I’m adding foreach($request->file(‘image’) as $file). I always get an error about having undefined variable. I attached my controller code below, Any idea how can I fix this and make the multiple file upload? if($request->hasFile(‘image’)) ..

Read more

I want to make comments like the below one in vs code. Is there any extension available for that? <?php return [ /* |————————————————————————– | Authentication Defaults |————————————————————————– | | This option controls the default authentication "guard" and password | reset options for your application. You may change these defaults | as required, but they’re ..

Read more

I have a Linux which is accessed via SSH from my Windows 10 My VSCode terminal is configured so it logs in and switches to the correct folder ready for interaction: "terminal.integrated.shell.windows": "C:Program FilesGitbinbash.exe", "terminal.integrated.shellArgs.windows": [ "-c", "ssh -tt -p22 [email protected] ‘cd /media/sf_shared; bash’" ], I’m also using better-phpunit, but for it to work, I ..

Read more

Everything seems to work, but VSCODE keeps reporting an error on attempt. Saying that the method has not been defined. <?php namespace AppHttpControllersAuth; use AppHttpControllersController; use AppModelsUser; use IlluminateHttpRequest; use IlluminateSupportFacadesHash; class RegisterController extends Controller { public function index() { return view(‘auth.register’); } public function store(Request $request) { //validation $this->validate($request, [ ‘name’ => ‘required|max:50’, ‘username’ ..

Read more

Hello guys i’m trying to buildstart a PHP existing web app made with Laravel. I made this: 1.Installed XAMPP for PHP version 7.4, also configure Apache Server and tested with localhost and that is working 2.Installed Composer and connected with PHP version 7.4 3.Intalled Node.js 4.npm install in the project 5.composer install in the project ..

Read more

I’m working on a simple laravel api but the post method on Rest client only returns a redirection. This is my RegisterController, public function store(Request $request) { $this->validate($request, [ ‘name’ => ‘required|max:255’, ‘username’ => ‘required|max:255′, ’email’ => ‘required|email|max:255’, ‘password’ => ‘required|confirmed’, ]); $success = User::create([ ‘name’ => $request->name, ‘username’ => $request->username, ’email’ => $request->email, ‘password’ ..

Read more

In config/app.php ‘aliases’ => [ ‘Route’ => IlluminateSupportFacadesRoute::class, ], when I am using Route in routes/web.php like Route::get(‘/’, ‘[email protected]’); I installed php intelephense extension in my vs code. So that it is showing error like Does anyone have any idea how to fix this issue? (Functionality is working fine but it is showing like the ..

Read more

Hey so I’m trying to change data and update them. But this error shows up when I press update button: "Call to a member function save() on array" So this is my code: Controller: public function update(Request $r) { $update_id = $r->uid; $name = $r->uname; $email = $r->umail; $add = $r->uadd; $update = AppModelsEmp_model::find($update_id); $update[‘name’]=$name; ..

Read more

My following steps: start apache and mysql using xampp. I already make sure .env and config database are same with config in mysql xampp. I run php artisan migrate. I hope I can find a solution .env: APP_NAME=Laravel APP_ENV=local APP_KEY=base64:lQ7m19iQsLsEFqWGT3reRk/a43smcZ1gDxY+wLqtoTQ= APP_DEBUG=true APP_URL=http://localhost DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laraveladmin DB_USERNAME=root DB_PASSWORD= database.php: <?php use IlluminateSupportStr; return [ ‘default’ ..

Read more

When I run "laravel new " command, I get the following exception. [RuntimeException] Could not delete C:wamp64www/vendor/composer/xxxxxlaravel-laravel-3b2ed46bootstrapcache: This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed What I have tried: Checked the permissions of www directory Used the Command prompt and git bash in Admin ..

Read more

Whenever I started php artisan serve it deleted serever.php file. Now I have uninstalled avast antivirus but still it gives this error and does not open the site properly. PS C:xampphtdocsecom_proj> php artisan serve Laravel development server started: http://127.0.0.1:8000 **[Fri Dec 11 12:52:23 2020] PHP 7.4.5 Development Server (http://127.0.0.1:8000) started [Fri Dec 11 12:52:45 2020] ..

Read more

I have downloaded a laravel code from github migrated everything. Now the problem is it works perfectly fine if I run the website through the link i.e http://localhost/ecom_proj/public/. But when I start server by PHP artisan serve on visual studio code. The link http://127.0.0.1:8000 doesn’t work and the page says the site can’t be reached.And ..

Read more

I’m trying to set up xdebug to work in VS-Code on a windows environment with a Lighthouse / Laravel based server. My vscode settings look like this { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { ..

Read more