select *
Last Updated on May 1, 2023 by Moh
Last Updated on April 22, 2023 by Moh Once your SSH key has been generated on the server, you should add it to the SSH agent: $ eval “$(ssh-agent -s)” > Agent pid 59566 $ ssh-add ~/.ssh/yourKeyName SSH-agent is a program that manages SSH keys for secure authentication when logging into remote servers. When you
Fixing SSH key: [email protected]: Permission denied (public key) with GitHub Read More »
Last Updated on April 13, 2023 by Moh To check out to a specific commit in Git, you can use the git checkout command followed by the commit hash. Here are the steps: Find the hash of the commit you want to check out. You can use the git log command to see the commit
To check out to a specific commit in Git Read More »
Last Updated on April 13, 2023 by Moh In JavaScript, the nullish coalescing operator ?? is used to provide a default value for a variable if its value is null or undefined. For example, if we have a variable B and we want to provide a default value of an empty array [] if B
JavaScript nullish coalescing operator Read More »
Last Updated on April 13, 2023 by Moh In Laravel, gates and policies are authorization mechanisms that allow you to define and manage permissions for users and resources in your application. Gates are simple closures that determine whether a user is authorized to perform a particular action. They are typically used to check user permissions
Gates and Polices in Laravel Read More »
Last Updated on April 13, 2023 by Moh 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
How to make role “admin” using Sanctum Read More »
Last Updated on April 13, 2023 by Moh In Laravel, Resources are a way to transform and format Eloquent models and collections before returning them as JSON responses from your API. A Resource is essentially a class that provides a way to map the data from an Eloquent model or collection to a new
What is Laravel resources Read More »
Last Updated on April 24, 2023 by Moh 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