Skip to content

Instantly share code, notes, and snippets.

View markbiek's full-sized avatar

Mark Biek markbiek

View GitHub Profile
class Person extends Model {
use AlgoliaEloquentTrait;
public $indices = [‘my-index’];
public function getAlgoliaRecord() {
return array_merge($this->toArray(), [
‘addresses’ => $this->addresses->toArray(),
‘contacts’ => $this->contacts->toArray()
]);
use AlgoliaSearch\Laravel\AlgoliaEloquentTrait;
class Person extends Model {
use AlgoliaEloquentTrait;
public $indices = [‘my-index’];
}
// Test
console.log('testing');
pick 6c97635 Added hello_world method
fixup 3e8b993 fixup! Added hello_world method
commit 3e8b993b588fd322062707897dcfa360a918a4c8
Author: Mark Biek <[email protected]>
Date: Tue Feb 9 09:16:14 2016 -0500
fixup! Added hello_world method
commit 6c9763535248a081ad497ae3a5719dd14f2a83cd
Author: Mark Biek <[email protected]>
Date: Tue Feb 9 09:12:12 2016 -0500
commit 6c9763535248a081ad497ae3a5719dd14f2a83cd
Author: Mark Biek <[email protected]>
Date: Tue Feb 9 09:12:12 2016 -0500
Added hello_world method
commit 092c559e54c027a9b7ccb31289fef3cd6850273f
Author: Mark Biek <[email protected]>
Date: Tue Feb 9 08:59:50 2016 -0500
Added MyClass
pick 34ab067 Added MyClass
fixup 9cbcb58 Actually added class definition
fixup f9ec9e9 Added constructor
pick 34ab067 Added MyClass
pick 9cbcb58 Actually added class definition
pick f9ec9e9 Added constructor
commit f9ec9e9bcdb63119ccab3716b15c9fe78eae8e4c
Author: Mark Biek <[email protected]>
Date: Tue Feb 9 09:01:01 2016 -0500
Added constructor
commit 9cbcb58e8c18eeda9f73a5479cc3c867da2a3598
Author: Mark Biek <[email protected]>
Date: Tue Feb 9 09:00:23 2016 -0500