-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from CakeDC/master
Add new showcase item
- Loading branch information
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
config/Migrations/20240527091628_AddCrodSourceRescueProject.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class AddCrodSourceRescueProject extends AbstractMigration | ||
{ | ||
/** | ||
* up method. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
$this->table('projects')->insert([ | ||
'title' => 'CrowdSource Rescue', | ||
'website' => 'https://crowdsourcerescue.com/', | ||
'slug' => 'crowdsource-rescue', | ||
'technologies' => '', | ||
'brief_description' => "CrowdSource Rescue is a Texas based disaster response non-profit that has helped rescue over 60,000 victims of natural disasters", | ||
'description' => "<p><strong>CrowdSource Rescue</strong> is a Texas based disaster response non-profit that has helped rescue over 60,000 victims of natural disasters by connecting them to nearby volunteers and first responders.</p> | ||
<p>It utilizes <strong>CakePHP</strong> to build fast, support high-traffic applications, and trusts <strong>Cake's framework</strong> during literal life-and-death situations.</p>", | ||
'is_highlighted' => 1, | ||
'is_showcase' => 1, | ||
'created' => date('Y-m-d H:i:s'), | ||
'modified' => date('Y-m-d H:i:s'), | ||
])->save(); | ||
|
||
$result = $this->fetchRow("SELECT id FROM projects WHERE title like 'CrowdSource Rescue'"); | ||
|
||
$this->table('uploaded_files')->insert([ | ||
'file' => 'crowdsource-rescue.png', | ||
'dir' => 'webroot/files/PerspectiveImages/file/1716802210.2311', | ||
'size' => '91539', | ||
'type' => 'image/png', | ||
'created' => date('Y-m-d H:i:s'), | ||
'modified' => date('Y-m-d H:i:s'), | ||
'entity_id' => $result['id'], | ||
'model' => 'PerspectiveImages', | ||
])->save(); | ||
$this->table('uploaded_files')->insert([ | ||
'file' => 'crowdsource-rescue.png', | ||
'dir' => 'webroot/files/ScreenMonitorImages/file/1716802210.2389', | ||
'size' => '91539', | ||
'type' => 'image/png', | ||
'created' => date('Y-m-d H:i:s'), | ||
'modified' => date('Y-m-d H:i:s'), | ||
'entity_id' => $result['id'], | ||
'model' => 'ScreenMonitorImages', | ||
])->save(); | ||
} | ||
|
||
/** | ||
* down method. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
$this->query("DELETE FROM uploaded_files WHERE file like 'crowdsource-rescue.png'"); | ||
$this->query("DELETE FROM projects WHERE title like 'CrowdSource Rescue'"); | ||
} | ||
} |
Binary file added
BIN
+89.4 KB
webroot/files/PerspectiveImages/file/1716802210.2311/crowdsource-rescue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89.4 KB
webroot/files/ScreenMonitorImages/file/1716802210.2389/crowdsource-rescue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+88.6 KB
.../files/ScreenMonitorImages/file/1716802210.2389/crowdsource-rescuehighlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+88.2 KB
...oot/files/ScreenMonitorImages/file/1716802210.2389/crowdsource-rescueslider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.5 KB
webroot/files/ScreenMonitorImages/file/1716802210.2389/crowdsource-rescuesmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.