Skip to content

Ways to write Laravel routes

Is there a better way to write these routes? It seems I am repeating the same controller in my route files. Answer You can use a resource route, where you specify a subset of actions in the controller. You can also use the –model option when generating a controller with the stubbed out CRUD methods. Res…

How should i check hashed passwords

I use crypt ( password , $2y$10$predefinedsalt) to generate hashes.. Is it okay to just check them with other hashes using a normal if? $password = crypt ( password , $2y$10$predefinedsalt); $…

PHP echo mehod ignores HTML part

I have written the following PHP code: the_field() is a function of “advanced custom fields” Plugin. https://www.advancedcustomfields.com/resources/the_field/ The problem is that only the variable is output, but not the HTML part. How can I solve the problem? Answer I don’t know why, but the…

Google api v3 calandar quickadd php

I’m trying to create events in my google calendar with the google quickadd API. Here is my code: I keep getting the error below. Can someone please tell me why? Fatal error: Uncaught GoogleServiceException: { “error”: { “code”: 401, “message”: “Request is missin…