This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.2-fpm | |
COPY app /var/www/ | |
EXPOSE 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Livewire\Forum; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\DB; | |
use Livewire\WithPagination; | |
use Livewire\Component; | |
use App\Message; | |
use App\User; | |
class Chat extends Component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Livewire; | |
use App\Contact; | |
use Livewire\Component; | |
class ContactSearchBar extends Component | |
{ | |
public $query; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Livewire\Component; | |
class Download extends Component | |
{ | |
public function download() | |
{ | |
// get the path to the file | |
$path = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Component::macro('notify', function ($message, $title = '', $type = 'success') { | |
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. First tell MPESA to enable the PAYBILL API | |
// 2. Give them the URL you want their servers to ping on a successful payment made | |
// 3. They will ping ur server’s with a URL like this if you gave them “domainname.com" | |
// https://domainname.com/mpesa? id=59538715& orig=MPESA& dest=254706513985& tstamp=2014-11-11+16%3A55%3A09& text=FY69MY145+Confirmed.+on+11%2F11%2F14+at+4%3A54+PM+Ksh4%2C516.00+received+from+MARGARET+WANJIRU+254714236724.+Account+Number+16042+New+Utility+balance+is+Ksh3 &customer_id=274& user=safaricom& pass=3EdoRm0XHiUPa7x4& routemethod_id=2& routemethod_name=HTTP& mpesa_code=FY69MY145& mpesa_acc=16042& mpesa_msisdn=254714236724& mpesa_trx_date=11%2F11%2F14& mpesa_trx_time=4%3A54+PM& mpesa_amt=4516.0& mpesa_sender=MARGARET+WANJIRU& business_number=8238238 | |
// 4. Now just break apart the POST parameters, in laravel I’d do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
# slashes. | |
# If your page resides at | |
# http://www.example.com/mypage/test1 | |
# then use | |
# RewriteBase /mypage/test1/ | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f |