php - could not find driver in laravel 5.4
问题描述
i receive this error when sending a request from angular project .
could not find driver (SQL: insert into
employees
(name
,address
,gender
,department_id
,education
,experiance
,updated_at
,created_at
) values (Karly Frost, Aliquam quo anim illum et nisi occaecat quam ad ut eveniet animi natus, f, 2, Eveniet in ab architecto neque ut molestiae magnam aliquip deleniti dolores quia hic est nobis tempora rerum, Laboriosam reprehenderit sint minima dolore quis dolorem perferendis, 2018-05-20 22:54:20, 2018-05-20 22:54:20))
but when i try to add new record using
php artisan tinker command and execute insert query using laravel eloquent it works very well
else i got this exception
notice : i use arch manjaro as my linux distributions
解决方案
You should install PDO on your server. Edit your php.ini (look at your phpinfo(), "Loaded Configuration File" line, to find the php.ini file path). Find and uncomment the following line (remove the ; character):
;extension=pdo_mysql.so
Then, restart your Apache server. For more information, please read http://php.net/manual/en/pdo.installation.php.
推荐阅读
- wordpress - 如何使用 wordpress 获取所有现有用户数据及其其他字段数据
- node.js - Node.js PM2 日志:应用程序 [server:0] 通过信号 [SIGKILL] 以代码 [0] 退出
- amazon-web-services - 是否可以从 AWS lambda 向 S3 存储桶发出 302 重定向请求以触发下载?
- java - 为什么 JDBC 中的搜索功能在我的代码中不起作用?
- reactjs - 承诺调用中的承诺后如何正确更新组件的状态?
- jquery - 每当我将边距放在圆形或方形元素上时,元素就会消失。我能知道这是什么原因吗?
- android - 登录按钮不起作用 Android Kotlin
- asp.net - 如何设置它的返回类型并显示相关的烤面包机作为响应
- jquery - 使用 jQuery 和固定背景图像在 Safari 上滚动抖动
- objective-c - 获取一周的开始和结束日期。月份、周数和年份作为用户输入给出