Moh

How to make role “admin” using Sanctum

To implement role-based authorization in Laravel Sanctum, you can use a combination of Sanctum’s token abilities feature and Laravel’s gates and policies. Here are the basic steps to implement role-based authorization using Sanctum:   Define your roles and abilities: Define the roles and abilities that your application requires. For example, you might have an admin […]

How to make role “admin” using Sanctum Read More »

Inserting Multiple Rows into a Database Table with PDO and Retrieving IDs of Inserted Rows

Inserting Multiple Rows into a Database Table with PDO and Retrieving IDs of Inserted Rows It is possible to insert multiple rows into a database table with a single query using PDO, but you won’t be able to retrieve the IDs of all inserted rows with a single query. If you need to insert multiple

Inserting Multiple Rows into a Database Table with PDO and Retrieving IDs of Inserted Rows Read More »