Tags
Language
Tags
June 2025
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
    Attention❗ To save your time, in order to download anything on this site, you must be registered 👉 HERE. If you do not have a registration yet, it is better to do it right away. ✌

    ( • )( • ) ( ͡⚆ ͜ʖ ͡⚆ ) (‿ˠ‿)
    SpicyMags.xyz

    laracasts: Incremental APIs with Jeffrey Way (2014)

    Posted By: ParRus
    laracasts: Incremental APIs with Jeffrey Way (2014)

    laracasts: Incremental APIs with Jeffrey Way (2014)
    English | MP4 | 1152 x 720 | AVC ~274 kbps | 15 fps
    AAC | 147 Kbps | 48.0 KHz | 2 channels | 1h 45m | 308.6 MB
    Genre: Video Tutorial

    Often, pitfalls and traps are a good thing! They teach us about what to avoid the next time around. This is how best practices emerge. With that in mind, in this series, let's take an incremental approach to understanding API development with Laravel.
    Contents:
    1 - We Need Dummy Data - 6:23
    If we're going to build an API from scratch, naturally, we require test/dummy data to work with. Luckily, Laravel (along with the popular Faker library) makes this process a cinch.

    2 - Level 1: Eloquent Queries to JSON - 6:48
    The "oh no she didn't" approach to building an API in Laravel is to simply return the result of an Eloquent query from your controller. Sure, Laravel is smart enough to cast this to JSON, but are you sure that's what you want to do? Let's talk about that.

    3 - Level 2: Responses and Codes - 7:53
    Returning the proper HTTP status codes (and potentially application-specific codes) is paramount to building a successful API.

    4 - Level 3: Transformations - 4:48
    We need to solve that issue of linking our API output to the structure of our database tables. One remedy might be to leverage transformations. We'll discuss that very thing in this lesson.

    5 - Extraction - 4:40
    As our code currently rests, there's a violation of the single responsibility priniciple. To fix this, let's extract the transformation process into its own set of classes.

    6 - Refactoring - 7:43
    The problem with HTTP status codes is that they can be difficult to remember. Rather than relying on "magic numbers" in our controllers, what if we instead abstract all that away to readable methods in a parent class?

    7 - Level 4: Basic Authentication - 10:38
    What happens when we want to limit access to our API? Well, clearly, we'll need some form of authentication. Let's start with the simplest solution: HTTP basic authentication (with SSL).

    8 - Level 5: Seeders Reloaded - 8:03
    As we prepare for a follow-up lesson on nested resources, let's return to our database seeders, and focus on refactoring and debugging.

    9 - Level 6: Tags and Nested Resources - 9:22
    Now that we're successfully presenting lessons to the consumers of our API, let's switch over to tags. Luckily, because most of the infrastructure is in place, allowing for nested resources will be fairly painless!

    10 - Level 7: Tests…Readable Ones! - 16:28
    Readability is the key to a successful test suite. We often throw around this word for production code, and then completely ignore the concept when it comes to testing. Don't do that! Let me help.
    View the the source for these tests: https://gist.github.com/laracasts/10331246

    11- Refactoring Tests and Traits - 13:23
    We made a lot of progress in the previous episode on testing our API, but there's still room for improvement. These tests need to be as simple as possible to write. How can we allow for that?
    View the source for this lesson on GitHub: https://gist.github.com/laracasts/10407179

    12 - API Pagination - 8:32
    We've ignored that pesky Lesson::all() long enough! Sure, it's fine when we have fifty records, but what about when that number becomes fifty thousand? Do you really want to fetch all those for each request? Of course you don't. Let's figure out how to paginate our API results.

    More info: homepage

    General
    Complete name : 05-Extraction.mp4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 14.2 MiB
    Duration : 4mn 40s
    Overall bit rate mode : Variable
    Overall bit rate : 424 Kbps
    Encoded date : UTC 2014-02-28 21:29:25
    Tagged date : UTC 2014-02-28 21:29:25

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 4mn 40s
    Bit rate : 274 Kbps
    Width : 1 152 pixels
    Height : 720 pixels
    Display aspect ratio : 1.600
    Frame rate mode : Constant
    Frame rate : 15.000 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.022
    Stream size : 9.18 MiB (65%)
    Writing library : x264 core 140 r2377 1ca7bb9
    Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=45 / keyint_min=15 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / vbv_maxrate=3750 / vbv_bufsize=12500 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Encoded date : UTC 2014-02-28 21:29:25
    Tagged date : UTC 2014-02-28 21:29:25
    Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
    Transfer characteristics : BT.709-5, BT.1361
    Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 4mn 40s
    Bit rate mode : Variable
    Bit rate : 147 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 4.92 MiB (35%)
    Encoded date : UTC 2014-02-28 21:29:25
    Tagged date : UTC 2014-02-28 21:29:25

    Screenshots

    laracasts: Incremental APIs with Jeffrey Way (2014)

    laracasts: Incremental APIs with Jeffrey Way (2014)

    laracasts: Incremental APIs with Jeffrey Way (2014)

    For more, Visit my AH-blog

    laracasts: Incremental APIs with Jeffrey Way (2014)