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
// in Controller | |
$form = $this->createForm(new Type\AnimalAdminType($animal), $animal); | |
// in AnimalAdminType | |
$builder->add('animal_photos', 'collection', array( | |
'type' => new \Fftdev\RescueBundle\Form\Type\AnimalPhotoAdminType(), | |
'allow_add' => true, | |
'allow_delete' => true, | |
'by_reference' => false, | |
)); |
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
Delivered-To: eric.cope@gmail.com | |
Received: by 10.46.74.25 with SMTP id x25csp1648758lja; | |
Mon, 23 Apr 2018 10:24:21 -0700 (PDT) | |
X-Google-Smtp-Source: AB8JxZr0rSsGpxCxOK2aJqgoQ9/fEYGwv/MzKU5Vd8IkEoWflOvqe26A42HUaBY1ny1Az1QtU44Q | |
X-Received: by 2002:a24:67d7:: with SMTP id u206-v6mr15098019itc.138.1524504261621; | |
Mon, 23 Apr 2018 10:24:21 -0700 (PDT) | |
ARC-Seal: i=1; a=rsa-sha256; t=1524504261; cv=none; | |
d=google.com; s=arc-20160816; | |
b=AmbWf5eiXTnK7gWZuTfjG/k0AU3VswVrLKVRw58vH0Fv1ccvrDHpxL5vbI4E9T7QxD | |
tmSe0m8dtHTVjdspyWFJ/1Wtq/wIgz9UDbBM6pRJ60i6COehVRRIObccyvyz76kZWHkr |
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
<!--[if gte mso 9]><xml> | |
<o:OfficeDocumentSettings> | |
<o:AllowPNG/> | |
</o:OfficeDocumentSettings> | |
</xml><![endif]--><!--[if gte mso 9]><xml> | |
<w:WordDocument> | |
<w:Zoom>0</w:Zoom> | |
<w:TrackMoves>false</w:TrackMoves> | |
<w:TrackFormatting/> | |
<w:PunctuationKerning/> |
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 | |
require(realpath(__DIR__ . '/../../../../../../vendor/autoload.php')); | |
require('./config.php') ; | |
require('./util.php') ; | |
require('./io.php') ; | |
require('./basexml.php') ; | |
require('./commands.php') ; | |
require('./phpcompat.php') ; |
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
public function getFeaturedProducts_DOESNTWORK_WITH_SQLITE($storeId, $limit = 1) | |
{ | |
$query = $this->product->newInstance() | |
->where('store_id', $storeId) | |
->limit($limit) | |
->with( | |
array( | |
'productMedia' => function ($query) { | |
/** | |
* we can't limit it because it gets all of the media at once |
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
// http://help.laravel.io/057572a2437e89584b95082c178617e8d5fd934b | |
$ticketResult = $this->getInvoiceTickets()->with( array( | |
'getTicket' => function ($query) { | |
$query->sum('costs')->as('costs); // check the sum method in the Eloquent Builder source file | |
} | |
))->get()->first(); | |
echo $ticketResult->getTicket; // or whatever the design pattern is |
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
public function testDownloadPass() | |
{ | |
// this is just my file repository, to generate the path | |
$path = $fileRepo->path('test.txt'); | |
// create the file | |
file_put_contents($path, 'twoseventwo'); | |
// more logic here as needed | |
// call needs the path, I use the Route helper to get it by name |
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 | |
$language='eng'; | |
$a = "http://"; // need some codes | |
// ?????????????? | Authentification | |
// $auth = 1; - ?????????????? ???????? ( authentification = On ) | |
// $auth = 0; - ?????????????? ????????? ( authentification = Off ) | |
$auth = 0; |
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
$screen_names = explode(' ',$tw_screen_name); | |
$twitterjsons = array(); | |
foreach($screen_names as $screen_name) { | |
$apioptions = array('screen_name'=>$screen_name,'include_entities'=>1,'count'=>10,'include_rts'=>$tw_include_rts,'exclude_replies'=>$tw_exclude_replies); | |
if($tw_search) { | |
$apioptions['q']=$tw_search; | |
$twitterdata = rotatingtweets_call_twitter_API('search/tweets',$apioptions); | |
} elseif($tw_get_favorites) { | |
$twitterdata = rotatingtweets_call_twitter_API('favorites/list',$apioptions); | |
} elseif($tw_list) { |