marghoobsuleman / hashtagcms

HashtagCms, Use it as Headless CMS or Bundled, API enabled, Admin Panel, multisite, multi-tenant, multiplatform, multilingual with endless possibilities. The Most powerful, fast, user-friendly and secured platform. Made with PHP Laravel Framework.
https://www.hashtagcms.org
MIT License
18 stars 4 forks source link

Admin menu links not working: Error ---> Call to undefined method App\Models\User::isSuperAdmin() #17

Closed DeRaja closed 2 years ago

DeRaja commented 2 years ago

Hello,

I know from the earlier installation (1.0/1.1/1.2) that this HashtagCMS you designed is powerful.

Earlier, it had a couple of bugs and so I decided not to use it. It wanted me to create tenants.site_id, langs.site_id and countries.country_id. manually. I did. I had to stop it because it was on php 7.3 and older Laravel.

I just install fresh Laravel installation of Laravel 8.7. Thereafter, I followed the installation instruction by you and installed HashtagCMS.

After login into the dashboard of HashtagCMS, I find that only some menus could generate further webpages, i. e. the code could resolve. However, some other menu links gives following error:

Call to undefined method App\Models\User::isSuperAdmin()

I am looking forward to using your masterpiece but with the above error, I am stuck.

Any solution?

Just to observe: it would have been better, if you had done on release basis and install all dependencies including of Laravel in original. Because all the routes will have to go through the HashtagCMS (to resolve the domains) there is no harm to have Laravel installed with the fresh. But may be not doing so, you may have reasons.

marghoobsuleman commented 2 years ago

Thank you for the suggestion. I'll keep that in mind.

For your problem: Open app\Models\User.php or app\User.php

Remove these lines: use Illuminate\Foundation\Auth\User as Authenticatable; use Laravel\Sanctum\HasApiTokens;

And add below line: use MarghoobSuleman\HashtagCms\User as Authenticatable; use Laravel\Passport\HasApiTokens;

marghoobsuleman commented 2 years ago

@ArcDee Can we close this?

DeRaja commented 2 years ago

Hello Marghoob,

I did a fresh install of Laravel and HashtagCMS 1.3. Then I applied above changes.

Everything is working fine as expected.

From all the software I have installed for testing purposes, HashtagCMS is amongst them extremely clever. It is just amazing because of its fundamental logic. You have designed the basics to exploit the power of many Laravel bundles in its maximum!

Many sincere thanks. I really appreciate your work and support.

Yes, please close this issue.