laravel ඉගෙන ගන්න.

හෙළයෙක්

Well-known member
  • Apr 26, 2014
    49,228
    99,963
    113
    මොන web framework එක උනත් මොන language එක බේස් කරගෙන හැදුවත් හදලා තියෙන්නේ එකම විදිහේ වැඩකට ඒ තමා data ටික save කරලා ඕනි වෙන වෙලාවට අරගෙන බලන කෙනාට අවශ්‍යය විධියට ඉඳිරිපත් කරන එක. ඔය සිම්පල් concept එක එක තමා එක එක අවශ්‍යතාව හැටියට expand වෙන්නේ.

    Language එකක් නිකන් අතපත ගාලා තිබ්බත් ඔය framework එකක් ගොඩ දාගන්න එක එච්චර අමාරු දෙයක් නෙවෙයි. වෙන්නේ මොකද්ද කියලා හැම වෙලේම කල්පණාවෙන් වැඩේ කරනවා නං.

    මම අලුතෙන් framework එකක් ඉගෙන ගන්න use කරන්නේ මෙන්න මෙහෙම වැඩක්. මොකක් හරි වැඩ කරන project එකකට ඕක සම්බන්ධ කරගෙන කරන එක.

    ඕක ටිකක් සීම්පල් වෙන්න කරන්න හෙල්ප් වෙන්න මම මේ නූල දාන්නන්. විශේයෙන්ම මේක දාන්න හිතුනේ @pasansnoop සහොට උදව්වවක් වෙන්න එයා මේක ඉගෙන ගන්න මහන්සි වෙන නිසා.




    හරි වැඩේට උදව් ගන්න පුළුවං උපරිමයෙන් bard.google.com ChatGPT වලින් සපෝට ගන්න.

    ඔයා මේ කරන්න හදන්නේ ටිකක් impossible වැඩක් මොකද ලෝකෙ කවුරුවත් මේවා උපතින් ගෙනාවා ස්කිල එකකින් හදන්න නෑ එක්ස්පිරියන්ස් එකෙන් තමා කරන්නේ. ඒ නිසා වැරදි අඩුපාඩු වෙන ඒක normal ඒවගෙන් පැනල යන ඒක තමා අවූල. වැරදි අඩුපාඩු වෙන්න වෙන්න තමා ඔයා හරියට ඉගෙන ගන්නේ. ඒ නිසා errors එනවට කැමති වෙන්න.

    මම දාන්නේ steps guide ලයින් විතරයි. වෙන concept මොනවා හරි දෙන resources වලින් තෙරුන් ගන්න බෑ වගේ උනොත් ඒ වෙලාවට පුළුවං විදියට explain කරන්නන් නැත්තං දාන steps ෆිනිශ් උනාම ඊළග ඒව බලන්න පිළිවෙලට.


    අපි කරන්නේ project එකක් අරගෙන ඒක දිනිෂ් කරන එක.මේකේ පිළිවලට framework එක ඉගෙන ගන්නවා කියල එකක් නෑ. Project එකට අදාලව තමා අපි ඉගෙන ගන්නේ. මේ ක්‍රමේ තියාන වාසිය තමා ඉක්මනට ඉගෙන ගන්න පුළුවන් වෙන එක. අවාසිය තමා සමහර වැදගත් කොටස් මිස් වෙන්න ඉඩ තියෙන ඒක.

    Project එක මම ඉල්ලා ගත්තේ ChatGPT එකෙන්.
    මේක තමා project එක.

    Project: Online Blogging Platform​

    Description:​

    Create an online blogging platform where users can register, write, and publish blog posts. The platform should allow for reading and commenting on posts by other users.

    Key Features & Learning Outcomes:​

    1. User Authentication:
      • Implement Laravel’s built-in authentication for user registration, login, and password management.
      • Learn: Auth scaffolding, guards, providers.
    2. Blog Post Creation:
      • Allow authenticated users to create, edit, and delete their blog posts.
      • Learn: CRUD operations, form handling, validation, Eloquent ORM.
    3. Comments System:
      • Implement a comments section for each blog post where users can post and view comments.
      • Learn: Eloquent relationships, form validation.
    4. User Profiles and Roles:
      • Create user profiles displaying their posts.
      • Implement roles (like admin, editor, subscriber) and permissions.
      • Learn: Middleware, authorization, policy classes.
    5. Responsive Front-End:
      • Design a responsive UI using Blade, along with HTML, CSS, and JavaScript.
      • Optionally integrate a front-end framework like Bootstrap or Tailwind CSS.
      • Learn: Blade templating, integrating CSS and JavaScript.
    6. API Development:
      • Create RESTful APIs for handling blog and comment data.
      • Learn: API routes, JSON responses, API authentication (Token or JWT).
    7. Testing:
      • Write tests for different components of your application.
      • Learn: PHPUnit, feature testing, unit testing.
    8. Deployment:
      • Deploy your application on platforms like Heroku, DigitalOcean, or AWS.
      • Learn: Deployment processes, environment management.

    Additional Enhancements:​

    • Implement an admin dashboard for user and post management.
    • Add features like search, tags, and categories for posts.
    • Implement email notifications for user registration, comments, or updates.
    • Incorporate a rich text editor for writing posts.

    Progression Steps:​

    1. Start Simple:
      • Begin with user authentication and basic CRUD operations for blog posts.
    2. Build Incrementally:
      • Gradually add more features like comments, user profiles, and roles.
    3. Focus on Quality:
      • Ensure your code is clean, well-documented, and tested.
    4. Get Feedback:
      • Share your project with friends or the Laravel community for feedback.
    Flow එක ඔහොම උනාට authentication මුලින් කරන්න එපා. මුලින්ම අපි කරන්න ඕනි

    Simple form එකක් හදලා එක පෙන්න එක
    ඊට පස්සේ ඒ form එකේ දාන දේවල් mysql dB එකේ save කරන එක. එකෙන් පස්සේ කරන්න ඕනි e save වෙච්ච වෙන එකක පෙන්න එක.

    ඔය කෑල්ල කර ගත්තාම මම දැන් දන්න ප්‍රමාණයට ඕක ගැන දැනගන්න තව ඔයාට යන්නේ බොහොම පොඩි කාලයක් විතරයි.

    ඔය බේසික් වැඩේ අපිට කොටස් වලට කඩා ගන්න පුළුවං මෙහෙම

    1. Run the Laravel project
    2. Add a custom component using Blade.
    3. Add a controller(SaveDataController) and use 'dd()' to display it using controllers.
    4. Create a results page and display dummy data as the desired end results. (Create custom route)
    5. Connect the controller and display values hard-coded in the PHP controller.
    6. Create a database and a table to store data.
    7. Update the environment file and connect it with the controller.
    8. Replace the dummy results data with data stored in the database.
    9. Add a save function to the form SaveDataController
    10. Add redirect after the save button to the results page
    (PHP, mysql දන්නේ නැති කෙනෙක් ඕක බලනාව නං ඒත් ඔය ස්ටෙප් එකම තමා එකම වෙනස පොඩ්ඩක් php,,mysql වලට අදාල w3school page එක refffer කරන්න වෙන එක විතරයි. වැඩිම උනොත් තව අමතර මාසයක් යයි)

    ඔය ටික කරන්න ගියාම වෙන්නේ කොහොමද වගේ දේවල් ගැන ලොකුවට කරදර වෙන්න එපා බලන tutorial වල තියෙන එක ඔබ්බල run උනාම ඕනි result එක ආව නං ඇති. වෙන හැටි ඉබේම තේරෙනවා ටික දවසක් යනකොට.

    Install කරගන්න උන්ගේ doc එක බලන්න.

    laravel ගෙන ගන්න උන්ගේ documentation එකයි ChatGPT හරි bard හරි ගන්න. ඒ හොඳටම ඇති. Video tutorial නං වැඩියෙන් සෙට් Laracast එක බලන්න. තව ඕනි නං කියන්න. ඔය ටික කරගන්න ටයිම් ඇරල ආයේ අප්ඩේට් එකක් දාන්නම්. උන්ගේ ඒව ගන්න කිව්වේ ඒව හොදට අප්ඩේට් එකේ best practice වලටම තියෙන නිසා.

    පුළුවන් තරම් track එකේ ඉන්න. Medium වගේ එකක මේවා ගැන යන topic වලට සෙට් වෙන්න. ඔව්ව ගැන කතා කරන ෆෝර්‍රම් වලට සෙට් වෙන්න. FB group වලට සෙට් වෙන්න. කරලා තියෙන open source laravel project ගෙන බලන්න. පුළුවං හැම වෙලේම මේකේම ඉන්න.

    අනික් අයත් උදව් වෙයි. ප්‍රශ්න ආවම දාන්න එන මුලින් බලන්න තනියම ගොඩ දාගණන් බැරිම උනොත් මේකේ දාන්න ට්‍රයි කරපු ස්ටෙප්ස් ටිකත් එක්ක. වෙන කවුරුවත් නෙවෙයි ඔයාව expert කෙනෙක් කරන්නේ ඔයාට එන errors ඒ නිසා ඒව එනවට කැමති වෙන්න.

    එහෙනම් ගුඩ් ලක්.

    දැනට SE වල ඉන්න අයගෙන් මතක් වෙන්නේ මේ කට්ටිය උදැව් ඕනි උනොත් අහන්න උදව් කරයි.
    @Solo Rider @Don GasCan @HAneo @Zeuz @RandomGuy @kolavari
    @Edward Kenway
    @Gwynbleidd
    @Mr Bones
    @Jack_Sparrow
    @හෙනයා
    @ITGuy25
    @MihiCherub

    තව මතක් වෙන අය මෙතනටම අප්ඩේට කරන්නන් ලේසි වෙන්න.
     
    Last edited:

    Solo Rider

    Well-known member
  • Sep 4, 2020
    35,924
    1
    157,340
    113
    98
    හෝමාගම
    this is really really appreciated machan (y)

    beginner කෙනෙක්ට udemy course එකක් කරනවට වඩා මේක සාර්තක වෙයි ෆීඩ් බැක් එකක් ගන්න ඕනෙ තරන් අය ඉන්න නිසා

    කට්ටිය සෙට් වෙන්න,
    මමත් Android, Flutter පැත්තෙන් පුලුවන් සපොට් එකක් දෙනව ඕන කෙනෙකුට
     

    thriloka

    Well-known member
  • Apr 28, 2022
    886
    969
    93
    Laravel තව කරන elakiri එකේ ඉන්නව කියන එක දකින්නත් සතුටුයි. මාත් පට්ට ආසයි Laravel වලට. Laracasts වලට අමතරව Laravel Daily web එකයි youtube channel දෙකම පට්ට. මේ දවස් වල Filament බලන ගමන් ඉන්නෙ. පට්ට ඒක. ලොකු දැනුමක් නෑ ඒත් Laravel ගැන දැනගන්න දෙයක් තියේනම් කියන්න, දන්නවනම් අනිව කියන්නම්. Good luck. 👊
     

    beam_tech

    Well-known member
  • Oct 13, 2017
    7,989
    14,353
    113
    වැලිවේරිය
    Laravel up tfs....මන් නම් laravel industry level කරලා නෑ...ඒත් ඉක්මනට project එක්ක කර ගන්න පට්ට framework එකක්...අනික php hosting ලාබ නිසා ලංකාවේ කුනු ලෝබයන්ට project ගහද්දි laravel තමා ගහන්න වෙන්නේ😌
     

    Gwynbleidd

    Well-known member
  • Aug 7, 2020
    11,870
    22,181
    113
    Kaer Morhen
    thewitcher.com
    tfs.. නියම STARTING පොඉන්ට් එකක්..


    @හෙළයෙක් FYI:
    මම SE නෙමේ හෙහෙ.. මම කරන්නේ RPA.. LOW CODE TOOLS එක්ක තමා වැඩ කරන්නේ... ඉතින් CODE කරන්නේ බොහොම කලාතුරකින්..LARAVEL එකක් ගැහුවා 1 ST YEAR අන්තිමේ එච්චර තම.. මම ඉතින් මගෙ යාලුවන්ගෙයි, INDUSTRY එකේ දන්නා අයගෙනුයි හම්බෙන EXPERIANCE වලින් තමා ඔය කියන ඒවා කියන්නේ HEHE...
    (SE INTERN හිටිය අවුරුද්දක් )
     

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    49,228
    99,963
    113
    tfs.. නියම STARTING පොඉන්ට් එකක්..


    @හෙළයෙක් FYI:
    මම SE නෙමේ හෙහෙ.. මම කරන්නේ RPA.. LOW CODE TOOLS එක්ක තමා වැඩ කරන්නේ... ඉතින් CODE කරන්නේ බොහොම කලාතුරකින්..LARAVEL එකක් ගැහුවා 1 ST YEAR අන්තිමේ එච්චර තම.. මම ඉතින් මගෙ යාලුවන්ගෙයි, INDUSTRY එකේ දන්නා අයගෙනුයි හම්බෙන EXPERIANCE වලින් තමා ඔය කියන ඒවා කියන්නේ HEHE...
    (SE INTERN හිටිය අවුරුද්දක් )
    SE field එකේ ඔක්කොම මචං මෙන්ශන් කරේ..මාත් laravel සැහෙන දවසකින් කරේ නෑ. මේක common method එකක් මම use karana.