Skip to content

Commit 8f0401c

Browse files
chore(hackathon): House cleaning
1 parent 61db04d commit 8f0401c

File tree

1 file changed

+42
-33
lines changed

1 file changed

+42
-33
lines changed

readme.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,6 @@ The same goes for other providers.
196196

197197
<hr>
198198

199-
<img src="https://s3.amazonaws.com/venmo/venmo_logo_blue.png" width="200">
200-
- Visit the **Account** section of your Venmo profile after logging in
201-
- Click on the **Developers** tab
202-
- Then click on the [new](https://venmo.com/account/app/new) link next to **Your Applications (0)**
203-
- Fill in the required fields: *App Name* and *What Will The App Be Used For?*
204-
- For **Web Redirect URL** enter: http://localhost:3000/auth/venmo/callback
205-
- Hit **Create** button
206-
- Back on the **Developers** tab click on **view** link next to **Your Applications (1) new**
207-
- Copy and paste **ID** and **Secret** keys into `.env` file
208-
209-
<hr>
210199

211200
<img src="https://stripe.com/img/about/logos/logos/[email protected]" width="200">
212201
- [Sign up](https://stripe.com/) or log into your [dashboard](https://manage.stripe.com)
@@ -423,22 +412,6 @@ how a particular functionality works. Maybe you are just curious about
423412
how it works, or maybe you are lost and confused while reading the code,
424413
I hope it provides some guidance to you.
425414

426-
###Custom HTML and CSS Design 101
427-
428-
[HTML5 UP](http://html5up.net/) has many beautiful templates that you can download for free.
429-
430-
When you download the ZIP file, it will come with *index.html*, *images*, *css* and *js* folders. So, how do you
431-
integrate it with Hackathon Starter? Hackathon Starter uses Bootstrap CSS framework, but these templates do not.
432-
Trying to use both CSS files at the same time will likely result in undesired effects.
433-
434-
**Note:** Using the custom templates approach, you should understand that you cannot reuse any of the views I have created: layout, home page, api browser, login, signup, account management, contact. Those views were built using Bootstrap grid and styles. You will have to manually update the grid using a different syntax provided in the template. **Having said that, you can mix and match if you want to do so: Use Bootstrap for main app interface, and a custom template for a landing page.**
435-
436-
Let's start from the beginning. For this example I will use [Escape Velocity](http://html5up.net/escape-velocity/) template:
437-
![Alt](http://html5up.net/uploads/images/escape-velocity.jpg)
438-
439-
**Note:** For the sake of simplicity I will only consider `index.html`, and skip `left-sidebar.html`,
440-
`no-sidebar.html`, `right-sidebar.html`.
441-
442415
<hr>
443416

444417
### How do flash messages work in this project?
@@ -472,19 +445,19 @@ checks if you are authenticated:
472445
]);
473446
```
474447

475-
If you are authenticated, you let this visitor pass through your "door" by calling `return next();` in the auth middleware and if you are authenticated, you will be redirected to *Account Management* page, otherwise you will be redirected to *Login* page.
448+
If you are authenticated, you let this visitor pass through your "door" by calling `return $next($request);` in the auth middleware and if you are authenticated, you will be redirected to *Account Management* page, otherwise you will be redirected to *Login* page.
476449

477450
Here is a typical workflow for adding new routes to your application. Let's say we are building
478451
a page that lists all books from database.
479452

480453
**Step 1.** Start by defining a route.
481454

482-
```js
455+
```php
483456
Route::get('/books', 'BookController@getBooks');
484457
```
485458
---
486459

487-
**Step 2.** Create a new schema and a model `Book.php` inside the *app* directory. You can simply run `php artisan make:model Book`
460+
**Step 2.** Create a new model `Book.php` inside the *app* directory. You can simply run `php artisan make:model Book`
488461

489462
```php
490463

@@ -498,13 +471,49 @@ class Book
498471
* @var array
499472
*/
500473
protected $fillable = [
501-
'name', 'author',
474+
'name', 'isbn',
502475
];
503476
}
504477

505478
```
506479

507-
**Step 3.** Create a new controller file called `BookController` inside the *app/Http/Controllers* directory. You can simply run `php artisan make:controller BookController`
480+
**Step 3.** Create a migration file like so: `php artisan make:migration create_books_table`
481+
482+
```php
483+
484+
use Illuminate\Database\Schema\Blueprint;
485+
use Illuminate\Database\Migrations\Migration;
486+
487+
class CreateBooksTable extends Migration
488+
{
489+
/**
490+
* Run the migrations.
491+
*
492+
* @return void
493+
*/
494+
public function up()
495+
{
496+
Schema::create('books', function (Blueprint $table) {
497+
$table->increments('id');
498+
$table->string('name');
499+
$table->string('isbn');
500+
$table->timestamps();
501+
});
502+
}
503+
504+
/**
505+
* Reverse the migrations.
506+
*
507+
* @return void
508+
*/
509+
public function down()
510+
{
511+
Schema::drop('books');
512+
}
513+
}
514+
```
515+
516+
**Step 4.** Create a new controller file called `BookController` inside the *app/Http/Controllers* directory. You can simply run `php artisan make:controller BookController`
508517

509518
```php
510519
namespace App\Http\Controllers;
@@ -530,7 +539,7 @@ class BookController extends Controller
530539
}
531540
```
532541

533-
**Step 4.** Create `books.blade.php` template.
542+
**Step 5.** Create `books.blade.php` template.
534543
```php
535544
@extends('layouts.master')
536545

0 commit comments

Comments
 (0)