IIS_Laravel - bigktmbig/MyExperienceAlgorithm GitHub Wiki
===========================handle mapping (IIS) *.php FastCgiModule "C:\Program Files\PHP\v7.0\php-cgi.exe" PHP7_via_FastCGI =================================web.config
-
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
===========================================enable pdo php.ini -
extension=php_pdo.dll
-
extension=php_pdo_firebird.dll
-
extension=php_pdo_mssql.dll
-
extension=php_pdo_mysql.dll
-
extension=php_pdo_oci.dll
-
extension=php_pdo_oci8.dll
-
extension=php_pdo_odbc.dll
-
extension=php_pdo_pgsql.dll
-
extension=php_pdo_sqlite.dll ================================ xóa cache project
-
php artisan config:cache
-
php artisan route:cache
-
php artisan cache:clear
-
php artisan config:clear
- change file DAO.php // $db = $this_->connectDB();// $db = DB::connection()->getPdo();
- .env DB_DATABASE=DB_TEST ============================= pusher not working I can only recommend You to check Your .env file and make sure BROADCAST_DRIVER is not log (try pusher) and also don't forget to keep running queue listener:
-
php artisan queue:listen
-
php artisan queue:listen redis
-
stop: php artisan queue:work connection --daemon
-
php artisan up (live page)
-
php artisan down (die page) ===== /**
-
The event's broadcast name.
-
@return string */ public function broadcastAs() { return 'my_event'; } =========web.php Route::get('/broadcast', function() {
event(new \App\Events\EditBlogEvent('Sent from my Laravel application')); return "ok";
}); ======================================================================
Route::get('/broadcast', function() { $aa = event(new App\Events\EditBlogEvent(array( 'blog_id' => '66', 'comment_id' => '110076', 'blog_textarea' => 'adsadad dssa' )));
return $aa;
});
===========================================================access from other PC php artisan serve --host 0.0.0.0 --port 8083 =========================================================push array to same member_id (member_id: 1, reviewer_id: [2,3]) $data_return['memberReviewers'] = array(); $tmpMemberId = ''; $tmpKey = -1; $tmpCount = 0; if (isset($data[1])) { foreach ($data[1] as $key => $dataRow) { if($dataRow['member_id'] != $tmpMemberId) { $tmpMemberId = $dataRow['member_id']; $tmpKey++; $tmpCount = 0; $data_return['memberReviewers'] = array_add($data_return['memberReviewers'], $tmpKey, array( 'member_id' => $dataRow['member_id'], 'reviewer_id' => array($tmpCount => $dataRow['reviewer_id']), )); }else { $tmpCount++; $data_return['memberReviewers'][$tmpKey]['reviewer_id'] = array_add($data_return['memberReviewers'][$tmpKey]['reviewer_id'], $tmpCount, $dataRow['reviewer_id']); } } } ============================================================Enable CORS 2019/07/22
=========================================================export xls, xlsx not working (Maatwebsite/Laravel-Excel) Reson: đặt tên file có chứa các ký tự đặc biệt, khoảng trắng, viết hoa, ...============================================update php vesion
- Register again PHP version in IIS
- Web.config
- Cấp quyền cho các folders(storage, public, ...) =======================================================Override method auth forgot password
- ' .
'
- ' . '' . ' '; for ($i = 1; $i <= $this->pageTotal; $i++){ $half_total_links = floor($this->linkLimit / 2); $from = $this->currentPage - $half_total_links; $to = $this->currentPage + $half_total_links; if ($this->currentPage < $half_total_links) { $to += $half_total_links - $this->currentPage; } if ($this->pageTotal - $this->currentPage < $half_total_links) { $from -= $half_total_links - ($this->pageTotal - $this->currentPage) - 1; } if ($from < $i && $i < $to){ if ($this->currentPage == $i) { $tmpClass = 'active'; }else { $tmpClass = ''; } $html .= '
- ' . '' . $i . '' . ' '; } } if ($this->currentPage == $this->pageTotal) { $tmpClass = 'disabled'; } $html .= '
- ' . '' . ' ' . '