Comments (11)
I'll take a look, yes it's Laravel 6. Might be an issue with PHP 7.4, I'll do some testing
from laravel-crm.
Ah ok, this is an interesting use case. The school management project has permissions tables already, which will conflict with the Spatie permissions package I have implemented. There is a way around this. Let me make some updates and run a few tests.
from laravel-crm.
Looks like conflict with the laravel-auditing package I set up for audit logging. What version of Laravel are you using?
from laravel-crm.
I am using this project.
https://github.com/hrshadhin/school-management-system.
I think it's 6.
from laravel-crm.
I have just released some updates and with latest version managed to get the package to install via composer. Please note I haven't completed a full install on that school management system. It is a bit out of date itself, no released for 2 years. Try a full install yourself and let me know if it works ok. I am also working on a CLI installer for the CRM as it is a bit manual at the moment.
from laravel-crm.
Ok.
from laravel-crm.
I have gone through all the installation steps but while executing 6th migration step it gives me following error.
Migrating: 2022_09_03_182548_create_permission_tables
Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'permissions' already exists (SQL: create table `permissions` (`id` bigint unsigned not null auto_increment primary key, `name` varchar(255) not null, `guard_name` varchar(255) not null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8 collate 'utf8_unicode_ci')
at /Applications/MAMP/htdocs/cloudschool1/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'permissions' already exists")
/Applications/MAMP/htdocs/cloudschool1/vendor/laravel/framework/src/Illuminate/Database/Connection.php:463
2 PDOStatement::execute()
/Applications/MAMP/htdocs/cloudschool1/vendor/laravel/framework/src/Illuminate/Database/Connection.php:463
Please use the argument -v to see more details.
So I changed table name from database/XX_create_permission_tables.php to crm_permissions
So I am getting this error
ErrorException : Undefined index: crm_permissions
at /Applications/MAMP/htdocs/cloudschool1/database/migrations/2022_09_03_182548_create_permission_tables.php:28
24| if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
25| throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
26| }
27|
> 28| Schema::create($tableNames['crm_permissions'], function (Blueprint $table) {
29| $table->bigIncrements('id');
30| $table->string('name'); // For MySQL 8.0 use string('name', 125);
31| $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
32| $table->timestamps();
Exception trace:
1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined index: crm_permissions", "/Applications/MAMP/htdocs/cloudschool1/database/migrations/2022_09_03_182548_create_permission_tables.php", [])
/Applications/MAMP/htdocs/cloudschool1/database/migrations/2022_09_03_182548_create_permission_tables.php:28
2 CreatePermissionTables::up()
/Applications/MAMP/htdocs/cloudschool1/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:392
Please use the argument -v to see more details.
from laravel-crm.
Hi, any update sir?
I would like to use in my school management system (to give it a wing to fly)
If I can do anything from my side to remove this error I would like to work on that please help.
from laravel-crm.
Can you try this:
- Add this to your env file
LARAVEL_CRM_PERMISSION_TABLE_PREFIX=crm_
- Replace the "permissions.php" file in the application config folder with this new version
https://github.com/venturedrake/laravel-crm/blob/master/config/permission.php
- Run the migrate command.
This should allow the Spatie package tables to use alternative table names so not as to conflict with the tables currently in the schools package.
from laravel-crm.
Hi,
Sorry couldn't get permission.php file from provided URL. Can you please send me again?
I am sorry for little late. :(
from laravel-crm.
Link should be https://github.com/venturedrake/laravel-crm/blob/master/config/permission.php
from laravel-crm.
Related Issues (20)
- Cant get the basic installation step for seeding? HOT 1
- Proper contribution through local package HOT 3
- Feature enhancement HOT 4
- 403 forbidden after login HOT 3
- CRM_Team destroy 403 THIS ACTION IS UNAUTHORIZED. HOT 3
- Font awesome not loading correctly HOT 2
- Spatie Team Enabled Issues HOT 14
- Hardcoded current_crm_team_id
- Organization name is being encrypted on creation. HOT 3
- Feature enhancements HOT 4
- Errors occurs when ran composer test HOT 2
- Spain translate?? HOT 1
- Problem with the views, controller and routes HOT 1
- SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cncerp.crm_users' doesn't exist (Connection: mysql, SQL: alter table `crm_users` add `url` varchar(255) null) HOT 3
- SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_crm.product_attributes' doesn't exist HOT 1
- Convert lead to deal - Link Product to Deal Error
- Deals does not store into DB the name of a customer HOT 3
- Feature : Customer History ? HOT 2
- Custom fields are not displaying to any model add or edit HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-crm.