Skip to main content

Posts

Showing posts from January, 2023

Property 'user' does not exist on type '{}' - NextJS - NextAuth Error

For NextJS framework the method name unstable_getServerSession  was renamed to  getServerSession . You can see the documentation on the following page. Next.js | NextAuth.js (next-auth.js.org) The code that generated the error for me was: if (!session?.user.id) return res.status(401).end("Unauthorized"); And the error messages were: unstable_getServerSession deprecated symbol used Type error: Property 'user' does not exist on type '{}'.

CRUD Content Management System (CMS) package for Laravel.

 Following are an outline of the steps you can take to create a CRUD content management system package for Laravel. Create a new package directory in your Laravel project. In the package directory, create a  `src`  directory for your package's source code. In the  `src`  directory, create a ` Controllers`  directory for your package's controllers. In the  `Controllers`  directory, create a  `PageController.php`  file for your package's page controller. In the  `PageController.php`  file, define the CRUD methods for managing pages (e.g.  `index`, `create`, `store`, `edit`, `update`, `destroy` ). In the  `src`  directory, create a  `Models`  directory for your package's models. In the  `Models`  directory, create a  `Page.php`  file for your package's page model. In the  `Page.php`  file, define the database schema and relationships for the pages. In the package directory, create a  `routes`  directory for your package's routes. In the  `routes`  directory, create