Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added podcast, item models to store feed items in database, updated v…
…iew to list feed items from db, added feature to generate resized thumbnail for each podcast and store to filesystem
- Loading branch information
1 parent
b51f74b
commit c436a6d
Showing
14 changed files
with
230 additions
and
33 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/vendor | ||
/node_modules | ||
.env | ||
/public/images/* |
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
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,16 @@ | ||
<?php namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Item extends Model { | ||
|
||
protected $fillable = ['user_id', 'podcast_id', 'title', 'description', 'url', 'audio_url','published_at']; | ||
|
||
/** | ||
* An item belongs to a podcast | ||
*/ | ||
public function podcast() | ||
{ | ||
return $this->belongsTo('App\Podcast'); | ||
} | ||
} |
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,20 @@ | ||
<?php | ||
|
||
return array( | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Image Driver | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Intervention Image supports "GD Library" and "Imagick" to process images | ||
| internally. You may choose one of them according to your PHP | ||
| configuration. By default PHP's "GD Library" implementation is used. | ||
| | ||
| Supported: "gd", "imagick" | ||
| | ||
*/ | ||
|
||
'driver' => 'gd' | ||
|
||
); |
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
47 changes: 47 additions & 0 deletions
47
database/migrations/2015_06_07_220046_create_items_table.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,47 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateItemsTable extends Migration { | ||
|
||
/** | ||
* Setup database table for items in each podcast | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('items', function(Blueprint $table) | ||
{ | ||
$table->increments('id'); | ||
$table->timestamps(); | ||
$table->integer('user_id')->unsigned(); | ||
$table->string('title'); | ||
$table->longText('description'); | ||
$table->string('url'); | ||
$table->string('audio_url'); | ||
$table->date('published_at'); | ||
$table->integer('podcast_id')->unsigned(); | ||
$table->foreign('podcast_id') | ||
->references('id') | ||
->on('podcasts') | ||
->onDelete('cascade'); | ||
$table->foreign('user_id') | ||
->references('id') | ||
->on('users') | ||
->onDelete('cascade'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('items'); | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
User-agent: * | ||
Disallow: | ||
Disallow: / |
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
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