laravel 发送邮件提示错误laravel Trying to access array offset on value of type null,更新composer.
composer update
laravel 发送邮件提示错误laravel Trying to access array offset on value of type null,更新composer.
composer update
composer config -g repo.packagist composer https://packagist.laravel-china.org
修改php.ini
upload_max_filesize = 2M
改
upload_max_filesize = 10M
mac下改php.ini
/usr/local/etc/php/7.2/php.ini
$file = $request->file(‘photo’);
https://laravel.com/docs/5.1/requests#files
chated_at = now();
$table->timestamp(‘chated_at’)->nullable()->comment(‘聊天时间’);
$table->dropColumn(‘chated_at’);
composer require jpush/jpush
新建 config/jpush.php 文件
<?php
return [
'appKey' =>env('JPUSH_APP_KEY', 'AppKey'),
'masterSecret' =>env('JPUSH_MASTER_SECRET', 'Master Secret')
];
php artisan make:controller JPushController –resource
Route::resource(‘jpush’, ‘JPushController’);
use JPush\Client as JPush;
$jpush = new JPush(config(‘jpush.appKey’), config(‘jpush.masterSecret’));
$response = $jpush->push()
->setPlatform(‘all’)
->addRegistrationId(‘190e35f7e0007dd42b0’)
->setNotificationAlert(‘hello tp3.2’)
->options([‘apns_production’=>true])//这句很重要,开发和生产版本通知切换,之前遇的坑。
->send();
print_r($response);
问题:laravel ios jpush 无法收到推送,web端正常,api不成功。
options 的 apns_production 要为true。见上方代码。
laravel 错误
Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length()
phpinfo()
OpenSSL support disabled (install ext/openssl)
下载https://windows.php.net/downloads/php-sdk/deps/vc15/x64/openssl-1.1.1a-vc15-x64.zip
解压后bin目录能看到libcrypto-1_1-x64.dll和libssl-1_1-x64.dll,两个文件都拷到php目录和apache的bin下
开启extension=openssl
重启Apache就好了
The each() function is deprecated. This message will be suppressed on further calls
alipay.trade.wap.pay-PHP-UTF-8/aop/AopClient.php
while (list ($key, $val) = each ($para_temp))
改
foreach ($para_temp as $key => $val) { {
new Date(item.created_at.replace(new RegExp(/-/gm) ,”/”))
post到/controllers到store方法
post到/controllers/到index方法