Skip to content

Change login system by API in Laravel 8

I make my first app with API. I am beginner in Laravel and php. I have this migration: and this is my AuthController: Login work’s fine. In addition to the login and password, I need to verify the status column. If status = 1 – then login is possible. How can I do this? Please help me 🙂 How can

unwanted leading space inside data from a table column

a column named story is a text type clicking on a button I have a jquery ajax to get data from that column – on a specific id on server side I have: on client side: everything works problem – there is a leading space before data on both places – bstory and console for example if column conte…

Why doesn’t the message POST

When sending data, an empty value comes in Yii2, why is that? Data post: id, name. JS PHP } Code 200, post null Answer By default the Yii reads post params from $_POST global variable. But web server only parses request of body send as application/x-www-form-urlencoded or multipart/form-data. If you send data…

Check JWT (Firebase) Token with Symfony 5.3

I’m working on an API, and I had implemented a JWT to make it stateless. I created an AuthController, which returns a JWT when login information is correct. Here you can see the return code that generates the token: This is the result when I run the authenticate method, un the URL localhost:8000/authent…

Multiple IDs rule in php code WooCommerce

I’m simply trying to make this php code work with multiple IDs Trying this doesn’t work – What’s the correct formatting? Answer Try this. Learn about in_array here : https://www.w3schools.com/php/func_array_in_array.asp Keep adding items in $ids as required.