<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: AbdlrahmanSaber</title>
    <description>The latest articles on Forem by AbdlrahmanSaber (@abdlrahmansaberabdo).</description>
    <link>https://forem.com/abdlrahmansaberabdo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F717307%2F1b739a07-f166-4358-ac35-5ce27235dd92.jpeg</url>
      <title>Forem: AbdlrahmanSaber</title>
      <link>https://forem.com/abdlrahmansaberabdo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abdlrahmansaberabdo"/>
    <language>en</language>
    <item>
      <title>Stop Starting From Scratch: How Claude Projects Will Change the Way You Work</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Sun, 03 May 2026 08:03:33 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/stop-starting-from-scratch-how-claude-projects-will-change-the-way-you-work-2k4b</link>
      <guid>https://forem.com/abdlrahmansaberabdo/stop-starting-from-scratch-how-claude-projects-will-change-the-way-you-work-2k4b</guid>
      <description>&lt;h2&gt;
  
  
  What Is a Claude Project?
&lt;/h2&gt;

&lt;p&gt;A Project is a persistent workspace inside Claude. Think of it as a dedicated room where you and Claude work together on a specific area of your life or work — and unlike a regular chat, it doesn't forget anything between sessions.&lt;/p&gt;

&lt;p&gt;Each Project has three key parts:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Instructions&lt;/strong&gt; — a set of guidelines that shape how Claude behaves inside that project. Always. Every conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Knowledge Files&lt;/strong&gt; — documents, notes, and files you upload that Claude can reference in every conversation within the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conversation History&lt;/strong&gt; — all your past chats inside that project are preserved and accessible.&lt;/p&gt;

&lt;p&gt;The context window for a Project is 200,000 tokens — roughly equivalent to a 500-page book. That's a lot of room to work with.&lt;/p&gt;

&lt;p&gt;The mental model is simple: if a regular Claude chat is a sticky note, a Project is a notebook. One is for quick thoughts; the other is where real work happens.&lt;/p&gt;




&lt;h2&gt;
  
  
  Custom Instructions: The Feature Most People Skip
&lt;/h2&gt;

&lt;p&gt;When you create a Project, you get a field called "Custom Instructions." Most people leave it blank or type something vague like "be helpful and professional." That's a waste.&lt;/p&gt;

&lt;p&gt;Custom Instructions are how you give Claude a standing brief — the kind of context you'd give a new colleague on their first day. Except you only have to write it once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to include in strong custom instructions:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Your role and context.&lt;/em&gt; Tell Claude who you are. "I'm a freelance UX writer working with B2B SaaS clients" is more useful than nothing. Claude will calibrate its vocabulary, assumptions, and suggestions accordingly.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tone and style preferences.&lt;/em&gt; Do you want formal or conversational? Bullet points or prose? Short and direct, or thorough? Spell it out. Claude will default to something reasonable, but "something reasonable" isn't the same as your preference.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What to always do.&lt;/em&gt; If you always want sources cited, say so. If you always want a summary at the top of long answers, say so. If you want Claude to push back when your ideas have holes, say so.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What to never do.&lt;/em&gt; "Don't use bullet points unless I ask" or "never suggest I use a different tool" — these kinds of guardrails save a lot of back-and-forth over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An example of weak vs. strong custom instructions:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Weak:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"You are a helpful assistant. Be professional and concise."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Strong:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I'm a product manager at a fintech startup. I'm working on reducing user churn. I prefer direct answers — lead with the conclusion, then explain. When reviewing my writing, give honest feedback and don't soften criticism. Never use corporate buzzwords. If I ask for a framework or process, give me one I can actually use in a meeting, not a textbook definition."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The second version saves you from re-explaining yourself in every single conversation. Over weeks of use, that compounds into a noticeably smarter working relationship.&lt;/p&gt;




&lt;h2&gt;
  
  
  Knowledge Files: Give Claude Something to Work With
&lt;/h2&gt;

&lt;p&gt;The second pillar of Projects is Knowledge Files — the documents and materials you upload to a Project for Claude to draw from.&lt;/p&gt;

&lt;p&gt;This is what turns Claude from a general assistant into something that actually understands &lt;em&gt;your&lt;/em&gt; work.&lt;/p&gt;

&lt;p&gt;Here's the idea: any document you find yourself referencing repeatedly in conversations — a style guide, a brief, a set of notes, a template — should live in your Project's knowledge base instead of being re-pasted into every chat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to upload:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Style guides or voice docs&lt;/strong&gt; — if you're using Claude for writing, upload the brand voice guidelines or your personal writing principles. Claude will match the tone without you having to describe it from scratch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SOPs or process docs&lt;/strong&gt; — upload your team's workflows or your own operating procedures. Ask Claude how to handle a situation and it'll answer based on how &lt;em&gt;you&lt;/em&gt; actually work, not a generic answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research or reference material&lt;/strong&gt; — working on a long-form project? Upload your notes, interview transcripts, or source documents. Claude can summarize, cross-reference, and synthesize across all of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Past work samples&lt;/strong&gt; — give Claude examples of writing, analyses, or outputs you're proud of. It gives Claude a calibration point for the quality and style you're aiming for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One important tip: &lt;strong&gt;be selective&lt;/strong&gt;. It's tempting to dump everything into a Project and let Claude sort it out. Don't. Focused, high-quality context produces better results than a pile of loosely related documents. If you're not sure a file belongs, it probably doesn't — yet.&lt;/p&gt;




&lt;h2&gt;
  
  
  Five Projects Worth Creating Today
&lt;/h2&gt;

&lt;p&gt;If you're not sure where to start, here are five concrete Project setups that work well for most people.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Job Search Project&lt;/strong&gt;&lt;br&gt;
Upload your current CV, a list of target roles, any cover letter templates you've used, and notes on companies you're watching. Custom instruction: "I'm actively job hunting. Help me tailor applications, prep for interviews, and research companies. Be direct about what's weak in my materials."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing / Content Project&lt;/strong&gt;&lt;br&gt;
Upload your style guide, a few past pieces you're proud of, and any editorial brief you're working from. Custom instruction: "Match my voice. Don't clean up my sentence fragments unless they're unclear. Push back if a headline is weak."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Work Project&lt;/strong&gt;&lt;br&gt;
Upload your team's internal docs, a glossary of terms, your org chart if relevant, and any recurring templates. Custom instruction: "I work in [role] at [company type]. Use our internal terminology. When I ask for an email or document, match our internal style."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning Project&lt;/strong&gt;&lt;br&gt;
Upload lecture notes, reading summaries, or course materials. Custom instruction: "I'm trying to understand [topic] deeply. Use the Socratic method when I get things wrong. Give me examples from [domain I already know]."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Side Project / Startup&lt;/strong&gt;&lt;br&gt;
Upload your product spec, user research notes, competitor notes, and any pitch material. Custom instruction: "We're building [brief description]. I'm the [role]. Prioritize speed and practical thinking over polish."&lt;/p&gt;




&lt;h2&gt;
  
  
  Tips for Getting the Most Out of Projects
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Write your custom instructions like you're onboarding someone.&lt;/strong&gt; Not vague adjectives ("be concise") but actual behavioral guidance ("when I ask for a plan, give me numbered steps with time estimates").&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One Project per context, not per task.&lt;/strong&gt; Don't create a new Project every time you start a new piece of work. A "Writing" Project covers all your writing work. A "Job Search" Project covers the whole job hunt. Projects are contexts, not folders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update your instructions when something annoys you.&lt;/strong&gt; If Claude keeps doing something you don't want, that's a signal — add a line to your custom instructions. The relationship improves as you refine it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep knowledge files current.&lt;/strong&gt; If you update a style guide or process doc, re-upload it. Stale context produces stale answers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use conversation history deliberately.&lt;/strong&gt; Because your history is preserved, you can ask Claude to refer back to decisions made in earlier sessions. "Based on the brief we discussed last week, draft the intro" is a perfectly valid prompt.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Bigger Shift
&lt;/h2&gt;

&lt;p&gt;The underlying idea here is simple but easy to miss: Claude is only as useful as the context you give it.&lt;/p&gt;

&lt;p&gt;A regular chat gives Claude nothing but your most recent message. Projects give Claude your role, your preferences, your documents, and your history — all at once, every time. That's not a small upgrade. It fundamentally changes what the tool can do for you.&lt;/p&gt;

&lt;p&gt;The people getting the most out of Claude aren't necessarily using better prompts. They're working inside Projects, with well-written instructions and a curated knowledge base. They're treating the relationship like a collaboration, not a search engine.&lt;/p&gt;

&lt;p&gt;So: what would your first Project be?&lt;/p&gt;

&lt;p&gt;If you already have one set up, drop your custom instructions in the comments — I'd genuinely love to see what's working for other people.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this useful, follow me here for more practical pieces on working with AI tools. I write for practitioners, not hype.&lt;/em&gt;&lt;/p&gt;




</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>llm</category>
    </item>
    <item>
      <title>Debug MCP Like Network Tab: Seeing Every Tool Call in Real Time</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Fri, 01 May 2026 16:58:46 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/debug-mcp-like-network-tab-seeing-every-tool-call-in-real-time-2gdf</link>
      <guid>https://forem.com/abdlrahmansaberabdo/debug-mcp-like-network-tab-seeing-every-tool-call-in-real-time-2gdf</guid>
      <description>&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj49lu5ev8v5ex008p0tc.png" alt=" " width="800" height="436"&gt;
&lt;/h2&gt;

&lt;p&gt;You triggered a tool call from Cursor, something went wrong, and the only feedback was silence—or a vague error. The server is running, the tool is registered, but you have no idea what actually crossed the wire. This article walks through getting a browser-based trace of every JSON-RPC message without touching your server code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Disclosure
&lt;/h2&gt;

&lt;p&gt;I maintain &lt;a href="https://github.com/AbdlrahmanSaberAbdo/mcpkit" rel="noopener noreferrer"&gt;mcpkit&lt;/a&gt;. This article explains how I use it to inspect Model Context Protocol traffic—I am biased, but the problem is real whether you use this tool or another.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is MCP?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; is an open protocol—&lt;a href="https://www.anthropic.com/news/model-context-protocol" rel="noopener noreferrer"&gt;introduced by Anthropic&lt;/a&gt;—that standardises how AI models connect to external tools and data. Think of it as a USB standard for AI capabilities: instead of every model and every tool inventing their own integration, they speak a shared language.&lt;/p&gt;

&lt;p&gt;The two main actors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP client&lt;/strong&gt; — the AI host: Cursor, Claude Desktop, VS Code with Copilot, or any app that wants to call tools on behalf of an LLM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP server&lt;/strong&gt; — a small process (yours, or a third party's) that exposes &lt;strong&gt;tools&lt;/strong&gt;, &lt;strong&gt;resources&lt;/strong&gt;, and &lt;strong&gt;prompts&lt;/strong&gt; over the protocol.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When an AI decides it needs to query a database or fetch documentation, it sends a &lt;code&gt;tools/call&lt;/code&gt; request to the relevant MCP server. The server runs the function and returns a result. All of this is &lt;strong&gt;JSON-RPC&lt;/strong&gt;—typically over &lt;strong&gt;stdio&lt;/strong&gt; pipes (stdin/stdout), though HTTP+SSE transports exist too.&lt;/p&gt;

&lt;p&gt;That's the handshake. The rest of this article is about what happens when that handshake goes wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  The black box
&lt;/h2&gt;

&lt;p&gt;MCP connects AI clients to tools: databases, APIs, filesystems. Under the hood the client and server exchange &lt;strong&gt;JSON-RPC messages&lt;/strong&gt;—often over &lt;strong&gt;stdio&lt;/strong&gt; (stdin/stdout pipes). Everything works until it doesn't: slow calls, wrong arguments, silent failures.&lt;/p&gt;

&lt;p&gt;Terminal logs help, but they rarely show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which &lt;strong&gt;JSON-RPC method&lt;/strong&gt; ran (&lt;code&gt;tools/call&lt;/code&gt;, &lt;code&gt;resources/list&lt;/code&gt;, …).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency&lt;/strong&gt; end-to-end.&lt;/li&gt;
&lt;li&gt;Full &lt;strong&gt;request and response payloads&lt;/strong&gt; side by side.&lt;/li&gt;
&lt;li&gt;Whether the failure was protocol-level or &lt;strong&gt;inside the tool result&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need something closer to a &lt;strong&gt;network tab&lt;/strong&gt;: a live list of interactions with drill-down—not a grep war.&lt;/p&gt;




&lt;h2&gt;
  
  
  Transparent proxy: no server surgery
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@abdlrahmansaber/mcpkit" rel="noopener noreferrer"&gt;mcpkit&lt;/a&gt; sits &lt;strong&gt;between&lt;/strong&gt; the MCP client and your server process. You don't patch your MCP server code. You wrap the spawn command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @abdlrahmansaber/mcpkit inspect &lt;span class="nt"&gt;--&lt;/span&gt; node ./dist/server.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(or &lt;code&gt;mcpkit&lt;/code&gt; if installed globally.)&lt;/p&gt;

&lt;p&gt;The inspector:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Starts your server as a child process.&lt;/li&gt;
&lt;li&gt;Copies traffic on stdin/stdout through a &lt;strong&gt;transparent proxy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Opens a &lt;strong&gt;browser dashboard&lt;/strong&gt; with a trace table.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  What you see on the dashboard
&lt;/h2&gt;

&lt;p&gt;Typical workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @abdlrahmansaber/mcpkit
mcpkit inspect &lt;span class="nt"&gt;--&lt;/span&gt; node path/to/your-mcp-server.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stderr prints a line like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[mcpkit] inspector dashboard: http://localhost:3200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open that URL. For each message you'll see:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Direction&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Client → server vs server → client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Method&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;e.g. &lt;code&gt;tools/call&lt;/code&gt;, &lt;code&gt;tools/list&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which tool name (for &lt;code&gt;tools/call&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Time for paired request/response&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Status&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OK, error, timeout, pending&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Click a row to open &lt;strong&gt;request&lt;/strong&gt; and &lt;strong&gt;response&lt;/strong&gt; JSON. That's how I confirmed Flux queries, API keys in params (then moved them to env), and slow buckets.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trace table&lt;/strong&gt; — several rows (mix success / error). &lt;strong&gt;Alt text example:&lt;/strong&gt; "mcpkit inspector dashboard showing method, tool name, latency, and status columns."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detail panel&lt;/strong&gt; — expanded row with &lt;strong&gt;Request&lt;/strong&gt; / &lt;strong&gt;Response&lt;/strong&gt; JSON for a &lt;code&gt;tools/call&lt;/code&gt;. &lt;strong&gt;Alt text example:&lt;/strong&gt; "Expanded MCP trace showing JSON request and response for a tools/call."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjeyar54xwfu79omuarx.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjeyar54xwfu79omuarx.webp" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CLI options worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--port 3201&lt;/code&gt;&lt;/strong&gt; — if 3200 is busy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--log-only&lt;/code&gt;&lt;/strong&gt; — stderr logging only, no browser (CI or SSH).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--export traces.json&lt;/code&gt;&lt;/strong&gt; — dump collected traces on exit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--server-name my-influx&lt;/code&gt;&lt;/strong&gt; — label traces when you run multiple proxies later.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Inspecting &lt;strong&gt;one&lt;/strong&gt; server covers a lot of debugging. When you run &lt;strong&gt;several MCP servers&lt;/strong&gt; at once—Influx, Postgres, docs fetchers, whatever—you usually configure each spawn command in &lt;strong&gt;whatever MCP host you use&lt;/strong&gt;: &lt;strong&gt;Cursor&lt;/strong&gt; (&lt;code&gt;.cursor/mcp.json&lt;/code&gt; or project MCP config), &lt;strong&gt;Claude Desktop&lt;/strong&gt; (&lt;code&gt;claude_desktop_config.json&lt;/code&gt;), &lt;strong&gt;VS Code&lt;/strong&gt; and other editors with MCP support, or any launcher that starts servers over stdio. Same idea everywhere: wrap the command so traffic can be traced.&lt;/p&gt;

&lt;h2&gt;
  
  
  For multi-server setups you want &lt;strong&gt;one shared dashboard&lt;/strong&gt; and a &lt;strong&gt;Server&lt;/strong&gt; column — that’ll be in the next article. &lt;code&gt;mcpkit serve&lt;/code&gt; plus &lt;code&gt;mckit proxy&lt;/code&gt; with &lt;code&gt;--inspector&lt;/code&gt; in each configured command (adapt the snippet to your tool’s JSON shape).
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/@abdlrahmansaber/mcpkit" rel="noopener noreferrer"&gt;&lt;code&gt;@abdlrahmansaber/mcpkit&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/AbdlrahmanSaberAbdo/mcpkit" rel="noopener noreferrer"&gt;AbdlrahmanSaberAbdo/mcpkit&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Feel free to connect 🌹me on:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/abdlrahmansaber/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/AbdlrahmanSaberAbdo" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>mcp</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Convert enum to string literal union type in TS</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Sat, 29 Oct 2022 14:40:44 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/convert-enum-to-string-literal-union-type-from-enum-in-ts-4ne6</link>
      <guid>https://forem.com/abdlrahmansaberabdo/convert-enum-to-string-literal-union-type-from-enum-in-ts-4ne6</guid>
      <description>&lt;p&gt;Hello everyone, this is a quick tutorial, In my work, I wanted to avoid duplicating code as I can and abstract things for example if I use an &lt;strong&gt;enum&lt;/strong&gt; named Weekdays and it contains the following data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum Weekdays = {
    MONDAY = 'mon',
    TUESDAY = 'tue',
    WEDNESDAY = 'wed'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's say you want to create a type called WeekdayType which should contain 'mon' | 'Tue' | 'Wed', how we can do this? Starting from version 4.1 you can do a tricky thing to do it in a single line of code, let's see it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type WeekdayType = `${Weekdays}`;
// WeekdayType = 'mon' | 'Tue' | 'Wed'|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations, you did it! Awesome, right?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Take me back, please!</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Sun, 24 Apr 2022 16:28:46 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/take-me-back-please-2lb2</link>
      <guid>https://forem.com/abdlrahmansaberabdo/take-me-back-please-2lb2</guid>
      <description>&lt;p&gt;Not your best day. You made changes you shouldn’t have and now everything is broken… Is there a way to undo those commits?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git keeps track of updates to the tip of branches using a mechanism called reference&lt;/strong&gt; &lt;code&gt;logs&lt;/code&gt;, or&lt;code&gt;reflogs&lt;/code&gt;Many Git commands accept a parameter for specifying a reference or “ref”, which is a pointer to a commit. Common examples include &lt;code&gt;git checkout&lt;/code&gt;or &lt;code&gt;git reset&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reflog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;you can get the record of all the commits done in Git.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HOc4is9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbxx2y41mj7gdtr2l4yd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HOc4is9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbxx2y41mj7gdtr2l4yd.png" alt="Image description" width="880" height="746"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you just need to find the commit prior to the one that caused all the hassle. &lt;code&gt;HEAD@{index}&lt;/code&gt; represents the specified commit, so just replace the index with the correct number and run:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset HEAD@{index}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The default action for git reset is &lt;code&gt;git reset --mixed&lt;/code&gt;. It means that the changes in your working directory will be preserved but not staged (since the index was modified to match the chosen commit, the changes are not in the index anymore).&lt;/p&gt;

&lt;p&gt;Other options are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Doesn’t modify the index or the working tree, leaving your changes staged for commit.
git reset --soft

# Use with caution, as it resets both the index and working tree. Uncommitted changes and all commits after will be removed.

git reset --hard

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now, you can start over from the point when everything in your repository worked like a charm. Remember to use it only locally, as modifying a shared repository is considered a serious crime.&lt;/p&gt;

&lt;p&gt;If you found this post useful please share it with your friends 😍&lt;/p&gt;

&lt;p&gt;Let’s connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://twitter.com/Abdlrahmansabe4"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>github</category>
      <category>git</category>
      <category>programming</category>
    </item>
    <item>
      <title>How view branches sorted by date in specific format and order</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Thu, 21 Apr 2022 03:13:20 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/how-view-branches-sorted-by-date-in-specific-format-and-order-34g7</link>
      <guid>https://forem.com/abdlrahmansaberabdo/how-view-branches-sorted-by-date-in-specific-format-and-order-34g7</guid>
      <description>&lt;p&gt;&lt;strong&gt;This a short tutorial from a git tricks series&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's know how we can list all branches sorted by date.&lt;/p&gt;

&lt;h3&gt;
  
  
  View branch sorted by date
&lt;/h3&gt;

&lt;p&gt;display a list of all local branches and sort them based on the date of their last commit.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sort desc (-committerdate)
git branch --sort=-committerdate

# sort asc (committerdate)
git branch --sort=-committerdate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you’d like to make a custom format you can use &lt;code&gt;for-each-ref&lt;/code&gt; with &lt;code&gt;--sort&lt;/code&gt; option and &lt;code&gt;--format&lt;/code&gt; option to write your format.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git for-each-ref --sort='-committerdate' --format='%(refname)%09%(committerdate)' refs/heads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above command, I print the refname first then commitdate in --format option the output will be like this&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;refs/heads/branch_name commitdate
refs/heads/branch_name2 commitdate

# real output
refs/heads/new_design   Wed Apr 20 12:24:21 2022 +0200

refs/heads/design_assets        Wed Apr 20 11:30:30 2022 +0200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you want to print the &lt;code&gt;date&lt;/code&gt; first then &lt;code&gt;refname&lt;/code&gt;, the option format will be like this &lt;code&gt;--format='%(committerdate)%09%(refname)%'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let’s say you don’t want to print refs/heads and want print just the &lt;strong&gt;branch&lt;/strong&gt; name each time, how we can do this? by using &lt;code&gt;sed&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git for-each-ref --sort='-committerdate' --format='%(refname)%09%(committerdate)' refs/heads | sed 's-refs/heads/--'

#output
branch_name commitdate
branch_name2 commitdate

#real output
new_design      Wed Apr 20 12:24:21 2022 +0200

design_assets   Wed Apr 20 11:30:30 2022 +0200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I find these commands incredibly helpful when returning to work from a weekend or just jumping from project to project. Hopefully, you can use these commands too!&lt;/p&gt;

&lt;p&gt;If you found this post useful please share it with your friends 😍&lt;/p&gt;

&lt;p&gt;Let’s connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://twitter.com/Abdlrahmansabe4"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Is it possible to create a commit with a different date?</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Wed, 20 Apr 2022 04:02:32 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/is-it-possible-to-create-a-commit-with-a-different-date-c32</link>
      <guid>https://forem.com/abdlrahmansaberabdo/is-it-possible-to-create-a-commit-with-a-different-date-c32</guid>
      <description>&lt;p&gt;&lt;strong&gt;This a first short tutorial from a Git Tricks series&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Sometimes, you might run into a situation where you need to create a commit with a different date than the current one. Luckily, you can handle this using following timestamp in git&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GIT_AUTHOR_DATE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;GIT_COMMITTER_DATE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;you might be now you're wondering what's actually the difference between &lt;code&gt;Author&lt;/code&gt; and &lt;code&gt;Committer&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Let's Understanding dates in Git: author date vs. committer date &amp;amp; ‘approxidate
&lt;/h4&gt;

&lt;p&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The author is the person who originally wrote the work, whereas the committer is the person who last applied the work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;So if, for instance, you send in a patch to a project, the author date will be when you made the original commit but the committer date will be when the patch was applied. Another common scenario is rebasing: rebasing will alter the commit date, but not the author date.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Command
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
GIT_AUTHOR_DATE='Mon May 18 19:32:11 2022 -0400' \
  GIT_COMMITTER_DATE='Mon May 18 19:32:11 2022 -0400'\
  git commit -m 'Commit from the past'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As shown in the example above, you can set both values to any date you like and your code will be committed on that date.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
you can also use other formats&lt;/p&gt;

&lt;h4&gt;
  
  
  Date formats
&lt;/h4&gt;

&lt;p&gt;RFC &lt;code&gt;2822 Mon, 18 May 2022 19:32:11 -0400&lt;/code&gt;&lt;br&gt;
ISO &lt;code&gt;8601 2022-05-18 19:32:11 -0400&lt;/code&gt;&lt;br&gt;
local &lt;code&gt;Mon May 18 19:32:11 2022&lt;/code&gt;&lt;br&gt;
short &lt;code&gt;2022-05-18&lt;/code&gt;&lt;br&gt;
relative &lt;code&gt;5.seconds.ago&lt;/code&gt;, &lt;code&gt;2.years.3.months.ago&lt;/code&gt;, &lt;code&gt;6am yesterday&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let’s connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://twitter.com/Abdlrahmansabe4"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>github</category>
    </item>
    <item>
      <title>How organize big projects in Laravel?</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Tue, 19 Apr 2022 08:20:41 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/how-organize-big-projects-in-laravel-5394</link>
      <guid>https://forem.com/abdlrahmansaberabdo/how-organize-big-projects-in-laravel-5394</guid>
      <description>&lt;h2&gt;
  
  
  Agenda
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Introduction&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What’s HMVC?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Advantages of using HMVC?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What’s wrong with the MVC pattern?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let’s know how we can use the HMVC pattern in Laravel!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pros&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cons&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Best Packages that generate modules and implement that approach&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Everyone when beginning a new project starts to ask himself/herself the following question?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How can I make organized the project well to be easy for me or for any other developer easy to understand for example if you’re looking for a file in a big project, you want to be easy to find that file, right?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We have many approaches and design patterns that make the project clean but in this article, I will talk about &lt;strong&gt;HMVC&lt;/strong&gt; (the Hierarchical-model-view-controller) pattern which makes your application modular.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What’s HMVC?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;HMVC&lt;/strong&gt; pattern extends the &lt;strong&gt;MVC&lt;/strong&gt; pattern and is a solution to overcome scalability problems apparent within large MVC applications.&lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;HMVC&lt;/strong&gt; application operates using a collection of MVC entities where each MVC entity can execute without the presence of any other. Ideally, each entity should never load models or libraries of other entities.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Advantages of using HMVC?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HMVC supports the reuse of code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HMVC allows easy distribution of MVC entities stored in a single directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HMVC reduces dependencies and allows to easily extend applications while retaining ease of maintenance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing is easier because the system is divided to a large extend into independent parts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What’s wrong with the MVC pattern?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Model-View-Controller (MVC) paradigm remains one of the more enduring patterns. However, the traditional MVC scope falls short when it comes to the control of GUI elements (widgets). MVC does not handle the complexities of data management, event management, and application flows.&lt;/p&gt;

&lt;p&gt;HMVC provides a powerful yet easy-to-understand layered design methodology for developing a complete presentation layer.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Let’s know how we can use the HMVC pattern in Laravel!&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s assume we have an accounting project that has (Banking — Sale— Transaction), the question now is how we can organize the project using HMVC! let’s divide these three parts into MVC components so you can have each of them separately developed but used as one!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example from a real accounting project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gWIsuiBH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ARwt1xel_eY15l-qwdsvOYw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gWIsuiBH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ARwt1xel_eY15l-qwdsvOYw.png" alt="laravel project example" width="540" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each module has its own (routes - middleware - controllers- etc..), and it’s help you to make your project more organized.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Pros&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Modularization: reduction of dependencies between the disparate parts of the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;More organized: having a folder for each of the relevant triads makes for a lighter workload.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reusability: by the nature of the design it is easy to reuse nearly every piece of code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extendibility: this makes the application more extensible without sacrificing ease of maintenance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cons&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Create More Folders But the solution of it in my opinion that we will remove unused folders.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Best Packages that generate modules and implement that approach&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;we have many packages with Laravel that generate modules but I will share in this article my own package (Laragine) and other packages that I used in many projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Laravel Modules&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Is a Laravel package that was created to manage your large Laravel app using modules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This package just structures your project (Modules) and doesn’t provide any implementation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Laragine&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;is a Laravel package that was created to manage your large Laravel app using modules also but here’s a difference, this package implements all API CRUD operations with unit tests, the package generates (Controller — Model — Factories — Migrations — unit tests — etc..), all you need to do to just add your API route in your route folder and everything (APIs CRUD operations) will work magically sounds interesting, right!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;check this &lt;a href="https://www.youtube.com/watch?v=5klckaSiM6g"&gt;video &lt;/a&gt;to know more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I wrote a series of blogs about it you can check it from here &lt;a href="https://dev.to/abdlrahmansaberabdo/series/14891"&gt;https://dev.to/abdlrahmansaberabdo/series/14891&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check the &lt;a href="https://yepwoo.com/products/laragine/docs/v2/introduction"&gt;documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Basically, the HMVC pattern is just an extension of MVC. An HMVC application includes one or more MVC sub-applications. so anything MVC can do, HMVC can do too. Now, it depends on whether you need the flexibility and scalability that HMVC offers.&lt;/p&gt;

&lt;p&gt;Let’s connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://twitter.com/Abdlrahmansabe4"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>webdev</category>
      <category>php</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Do we have pointers in python like other programming !</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Wed, 16 Feb 2022 09:21:22 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/how-to-use-pointers-in-python-5ahp</link>
      <guid>https://forem.com/abdlrahmansaberabdo/how-to-use-pointers-in-python-5ahp</guid>
      <description>&lt;p&gt;Pointer is important to understand for the way you’re going to create data structures.&lt;/p&gt;

&lt;p&gt;I’m going to start with something that is not a pointer and then compare it to something that does use a pointer.&lt;/p&gt;

&lt;p&gt;Let’s say that we have two &lt;strong&gt;variable&lt;/strong&gt;  &lt;code&gt;num1, num2&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;num1 = 11, 
num2 = num1

print("Before: ")
print(num1) #11
print(num2) #11

# then let's change num1

num1 = 22

print("\nAfter\n")
print("num1 =", num1) #22
print("num2 =", num2) #11 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you realized &lt;code&gt;num2&lt;/code&gt; is still the same 11, you’re wondering now why &lt;code&gt;num2&lt;/code&gt; still equals the same number, is it should update to 22 because we update num1!&lt;/p&gt;

&lt;p&gt;So when you set &lt;code&gt;num1 = num2&lt;/code&gt;, these are not linked forever, you are just initializing, and that is what happens when you’re working with something that is not using a pointer.&lt;/p&gt;

&lt;p&gt;Now, let’s compare this to something that does use a pointer.&lt;/p&gt;

&lt;p&gt;We’re going to use a dictionary in python, when you have something set equal to a dictionary, it’s a &lt;strong&gt;pointer&lt;/strong&gt; to the dictionary.&lt;br&gt;
Let’s use the same example and see.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dict1 = {
    'value': 11
}

dict2 = dict1

print("Before: ")

print("num1= ", dict1) # {value: 11}
print("num2= ", dict2) # {value: 11}

dict1['value'] = 22

print("\nAfter\n")

print("num1= ", dict1) # {value: 22}
print("num2= ", dict2) # {value: 22}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;so when you set &lt;code&gt;dict2 = dict1&lt;/code&gt; , you are literally saying &lt;code&gt;dict2&lt;/code&gt; points to the exact same dictionary in memory as &lt;code&gt;dict1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are a &lt;strong&gt;couple of other concepts&lt;/strong&gt; I want to show here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first concept is&lt;/strong&gt;, let’s just say we have another dictionary called dict3&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dict3 = {'value': 57}

dict2 = dict3

print (dict2) # {value: 57}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The pointer can be redirected like this also, and this idea of having a pointer point to a new place is a concept that you’ll use in a data structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The second concept is&lt;/strong&gt;, let’s say now we set &lt;code&gt;dict1 = dict2&lt;/code&gt; now all variables &lt;code&gt;(dict1 — dict2 — dict3)&lt;/code&gt;&lt;br&gt;
are pointing to &lt;code&gt;{'value':57}&lt;/code&gt; so you might ask now, what happens to that dictionary &lt;code&gt;{'value': 22}&lt;/code&gt; which is the old value for &lt;code&gt;dict1&lt;/code&gt; before pointing to &lt;code&gt;dict3&lt;/code&gt;. is not a way to get that pointer again &lt;code&gt;{'value': 22}&lt;/code&gt;? yes no way to get this pointer again, now we should ask &lt;strong&gt;what python does to free this memory up?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Good question, python will run a process called &lt;strong&gt;garbage collection&lt;/strong&gt; to remove this.&lt;/p&gt;

&lt;p&gt;If you like the post leave a comment and tell me if you’d like to make a series of posts about data structure and how we can use pointers in it.&lt;/p&gt;

&lt;p&gt;Let’s connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Understand how the views work in Laragine (a package in laravel)</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Wed, 06 Oct 2021 22:29:36 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/understand-how-the-views-work-in-laragine-package-in-laravel-4ke</link>
      <guid>https://forem.com/abdlrahmansaberabdo/understand-how-the-views-work-in-laragine-package-in-laravel-4ke</guid>
      <description>&lt;p&gt;In the previous tutorials we created a fully CRUD &lt;code&gt;API&lt;/code&gt; with unit tests, in this tutorial we'll understand how to work with views in &lt;code&gt;Laragine&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When we installed Laragine in the previous tutorial, it's created under the &lt;code&gt;core&lt;/code&gt; folder as we know, and also it has created a folder called the &lt;code&gt;Base&lt;/code&gt;, we can't discuss everything in the &lt;code&gt;Base&lt;/code&gt; folder in this tutorial, but I'll explain it separately.&lt;/p&gt;

&lt;p&gt;under &lt;code&gt;Base&lt;/code&gt; folder there are two folders called &lt;code&gt;views - unit_template&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;views&lt;/strong&gt; folder there's a folder called &lt;code&gt;layout&lt;/code&gt;, in &lt;code&gt;layout&lt;/code&gt; folder you should create the base views for your website like &lt;code&gt;navbar sidebar - buttons - etc..&lt;/code&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ws5sojGp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34wb57ou8e3zg2t2os96.png" alt="image"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What's &lt;code&gt;unit_template&lt;/code&gt; for, in &lt;code&gt;core\Base&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;let's assume that you'll create a &lt;code&gt;blog&lt;/code&gt;, the &lt;code&gt;blog&lt;/code&gt; has units like &lt;code&gt;post - comment - like&lt;/code&gt;, each &lt;code&gt;unit&lt;/code&gt; will have &lt;code&gt;get - store - update - delete&lt;/code&gt; methods, right?&lt;/p&gt;

&lt;p&gt;So each unit will have a form for creating - update and a page for showing all units - specific unit, so in each unit, you'll create these files and implement it, instead of creating the views each time in the unit you can put the default views that will be in each unit like &lt;code&gt;form - table - show&lt;/code&gt; page and when create a unit you'll just add the non-common other stuff like &lt;code&gt;attributes - titles - etc..&lt;/code&gt; in the &lt;code&gt;form - table - show page - etc..&lt;/code&gt; and make minor changes depends on your project and your way.&lt;/p&gt;

&lt;p&gt;let's go to the &lt;code&gt;unit_template&lt;/code&gt; folder in &lt;code&gt;core\Base&lt;/code&gt; you'll see five files &lt;code&gt;_form - create - edit - index - show&lt;/code&gt; you can remove the current &lt;code&gt;code&lt;/code&gt; &lt;strong&gt;it's just an example&lt;/strong&gt; and put your own &lt;code&gt;code&lt;/code&gt; inside it and make a style for it. you might be thinking now how can I use these files!&lt;/p&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;p&gt;Please take a look at the blade files inside &lt;code&gt;core/Base/views&lt;/code&gt; and &lt;code&gt;core/Base/unit_template&lt;/code&gt; you will notice that &lt;code&gt;$global&lt;/code&gt; variable is shared across all the views, the &lt;code&gt;$global&lt;/code&gt; variable will help you to load &lt;code&gt;views - route&lt;/code&gt; dynamically.&lt;br&gt;
&lt;strong&gt;I'll make seperated tutorial about the &lt;code&gt;$global&lt;/code&gt; variable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'll edit the &lt;code&gt;_form&lt;/code&gt; file as an example in &lt;code&gt;core/Base/unit_template&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p2t1zEXC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3n3ejkuo04ylb0j98p7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p2t1zEXC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3n3ejkuo04ylb0j98p7.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Let's create a new unit called &lt;code&gt;comment&lt;/code&gt; under &lt;code&gt;blog&lt;/code&gt; module&lt;br&gt;
&lt;strong&gt;Blog module that we created in the previous tutorial&lt;/strong&gt; &lt;br&gt;
&lt;code&gt;php artisan laragine:unit comment --module=blog --init&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;now I'll not discuss what we should do with &lt;code&gt;JSON&lt;/code&gt; file if you don't know please see previous &lt;strong&gt;tutorial number (1)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's run the second part of &lt;code&gt;unit command&lt;/code&gt;&lt;br&gt;
&lt;code&gt;php artisan laragine:unit comment --module=blog&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;let's go to &lt;code&gt;core\Blog\views\comment&lt;/code&gt;&lt;br&gt;
if you remember I have just updated the &lt;code&gt;_form&lt;/code&gt; file in &lt;code&gt;core/Base/unit_template&lt;/code&gt; let's see it in the &lt;code&gt;views&lt;/code&gt; in &lt;code&gt;comment&lt;/code&gt; unit&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J4ZnvZrA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgq0rhg8bx2r2fuc84g1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J4ZnvZrA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgq0rhg8bx2r2fuc84g1.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it's the same code that I put in the &lt;code&gt;_form&lt;/code&gt; file in the &lt;code&gt;core/Base/unit_template&lt;/code&gt; folder, right? so we can conclude that each unit will copy the code under the &lt;code&gt;core\Base\unit_template&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What're the benefits?&lt;/strong&gt;&lt;br&gt;
You might be wondering now what're the benefits of doing this, you don't need to write the same code each time in &lt;code&gt;default files&lt;/code&gt; in each &lt;code&gt;unit&lt;/code&gt; like &lt;code&gt;forms - tables - shows&lt;/code&gt; page, you will just put your &lt;code&gt;template&lt;/code&gt; with all &lt;code&gt;style&lt;/code&gt; then the views will be created automatically for you, then you'll just write other stuff like &lt;code&gt;attributes - titles - etc..&lt;/code&gt; inside them.&lt;/p&gt;

&lt;p&gt;*I mean by saying &lt;code&gt;attributes&lt;/code&gt; the name of &lt;code&gt;attributes&lt;/code&gt; in your table let's say when creating a &lt;code&gt;_form&lt;/code&gt; view, you'll need to create new &lt;code&gt;inputs&lt;/code&gt; for each &lt;code&gt;attribute&lt;/code&gt; like &lt;code&gt;title - body - etc..&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Now let's put a route for views
&lt;/h1&gt;

&lt;p&gt;go to &lt;code&gt;core\Blog\routes\web.php&lt;/code&gt; and add &lt;code&gt;Route::resource('comments', 'CommentController')-&amp;gt;except([&lt;br&gt;
   'store', 'update', 'destroy'&lt;br&gt;
]);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4QHY0SPc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zm99dqs3zwkngy5ukir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4QHY0SPc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zm99dqs3zwkngy5ukir.png" alt="image"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  Testing
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;now let's test the view, you can run &lt;code&gt;php artisan serve&lt;/code&gt; to create &lt;code&gt;http-server&lt;/code&gt; for your project &lt;code&gt;HTTP-server will listen to port 8000&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;let's go to &lt;code&gt;http://localhost:8000/admin/comments&lt;/code&gt;&lt;strong&gt;main domain - route&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t2n1I0b9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/suzrze6ab7l6kmd5gwfj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t2n1I0b9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/suzrze6ab7l6kmd5gwfj.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The style is not our main goal in this &lt;code&gt;tutorial&lt;/code&gt; I just want to teach you how to work with &lt;code&gt;views&lt;/code&gt; in &lt;code&gt;Laragine&lt;/code&gt;, you can navigate to any route you want for &lt;code&gt;comments&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;let's go to &lt;code&gt;http://localhost:8000/admin/comments/create&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aPa5cvWG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4atwiz7alqeip8nkla1m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aPa5cvWG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4atwiz7alqeip8nkla1m.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you realized my template appears as I edited in the &lt;code&gt;_form&lt;/code&gt; file which is just &lt;strong&gt;My Form&lt;/strong&gt; text.  &lt;/p&gt;

&lt;p&gt;That's all the basic usage of &lt;code&gt;Views&lt;/code&gt; in &lt;code&gt;Laragine&lt;/code&gt;,&lt;br&gt;
have fun experimenting in &lt;code&gt;Laragine&lt;/code&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>blade</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to use Unit tests in Laragine</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Mon, 04 Oct 2021 19:04:20 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/how-to-use-unit-tests-in-laragine-1jg8</link>
      <guid>https://forem.com/abdlrahmansaberabdo/how-to-use-unit-tests-in-laragine-1jg8</guid>
      <description>&lt;p&gt;In the previous tutorial, I taught you how to create a &lt;code&gt;fully CRUD API&lt;/code&gt;, let's continue the journey and learn how to use &lt;strong&gt;Laragine&lt;/strong&gt; to test the &lt;code&gt;API&lt;/code&gt; that we created in the previous tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps:
&lt;/h2&gt;

&lt;p&gt;We need to do 3 things in &lt;code&gt;phpunit.xml&lt;/code&gt; in the root directory:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Change the value of the &lt;code&gt;bootstrap&lt;/code&gt; attribute to &lt;code&gt;vendor/yepwoo/laragine/src/autoload.php&lt;/code&gt; in &lt;code&gt;PHPUnit&lt;/code&gt; tag (it's the same as &lt;code&gt;vendor/autoload.php&lt;/code&gt; but with needed stuff to run the tests correctly in the generated modules and units).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the following to the &lt;code&gt;Unit&lt;/code&gt; test suite:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;directory suffix=".php"&amp;gt;./core/*/Tests/Feature&amp;lt;/directory&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;directory suffix=".php"&amp;gt;./plugins/*/Tests/Feature&amp;lt;/directory&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;add the following to &lt;code&gt;Feature&lt;/code&gt; test suite:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;directory suffix=".php"&amp;gt;./core/*/Tests/Feature&amp;lt;/directory&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;directory suffix=".php"&amp;gt;./plugins/*/Tests/Feature&amp;lt;/directory&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Here's the full code snippet: *&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0s0987u0gmiezp883auf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0s0987u0gmiezp883auf.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let's go to &lt;code&gt;PostTest.php&lt;/code&gt; in &lt;code&gt;core/Blog/Tests/Feature&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;There're &lt;strong&gt;five&lt;/strong&gt; main &lt;em&gt;functions&lt;/em&gt; in the file: &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;testItShouldGetListingOfTheResource()&lt;/code&gt; 
for testing get the lists of the the resource.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;testItShouldStoreNewlyCreatedResource()&lt;/code&gt; 
for testing create a new resource in the storage. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;testItShouldGetSpecifiedResource()&lt;/code&gt; 
for testing get a specefied the resource.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;testItShouldUpdateSpecifiedResource()&lt;/code&gt;
for testing update a resource in the storage &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;testItShouldRemoveSpecifiedResource()&lt;/code&gt;
for testing remove a resource from the storage&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;p&gt;you can edit the unit tests function as you want, we just write the main methods for each CRUD.&lt;/p&gt;

&lt;p&gt;Now open your &lt;code&gt;terminal&lt;/code&gt; or &lt;code&gt;git bash&lt;/code&gt; in your project and let's run the test, you can run one of the following commands: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;php artisan test&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;./vendor/bin/phpunit&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F396wngvgv6lskazdg3z1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F396wngvgv6lskazdg3z1.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope you found this article helpful. If you need any help please let me know in the comment section.&lt;/p&gt;

&lt;p&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>programming</category>
      <category>php</category>
      <category>api</category>
    </item>
    <item>
      <title>How to create a fully crud API without implementing the CRUD functions in laravel!</title>
      <dc:creator>AbdlrahmanSaber</dc:creator>
      <pubDate>Mon, 04 Oct 2021 17:55:37 +0000</pubDate>
      <link>https://forem.com/abdlrahmansaberabdo/how-to-create-a-fully-crud-api-without-implementing-the-crud-functions-in-laravel-4e9d</link>
      <guid>https://forem.com/abdlrahmansaberabdo/how-to-create-a-fully-crud-api-without-implementing-the-crud-functions-in-laravel-4e9d</guid>
      <description>&lt;p&gt;Good day, today we are going to build a fully CRUD system (Web &amp;amp; API). API is a software intermediary that allows two applications to talk to each other. Somethings you might need to create an app that can be run on different languages or frameworks, for example, you can use Laravel to create the backend for your application while the frontend might run on any JavaScript frameworks. API allows two or more programs to communicate with each other.&lt;br&gt;
There are different types of APIs, but today we are going to concentrate on &lt;strong&gt;RESTful APIs. REST&lt;/strong&gt; stands for &lt;strong&gt;Representational State Transfer&lt;/strong&gt;, while &lt;strong&gt;API&lt;/strong&gt; stands for &lt;strong&gt;Application Programming Interface&lt;/strong&gt;. You can read more about API from the internet or other programming material.&lt;/p&gt;

&lt;p&gt;Click on my &lt;a href="https://dev.to/abdlrahmansaberabdo"&gt;profile&lt;/a&gt; to follow me to get more updates.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;We'll use a laravel package called &lt;strong&gt;Laragine&lt;/strong&gt;, this package helps us to &lt;strong&gt;create a fully CRUD system&lt;/strong&gt; by &lt;strong&gt;just writing simple commands&lt;/strong&gt; Without saying much, let's dive into it.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Laragine?
&lt;/h1&gt;

&lt;p&gt;Laragine is a laravel package which was created to manage your large laravel app using modules, let's say that you'll build a &lt;strong&gt;blog&lt;/strong&gt; the blog consist of (post - comment - like), &lt;strong&gt;blog-&amp;gt; is a module&lt;/strong&gt;, &lt;strong&gt;(post - comment - like) -&amp;gt; called units *&lt;em&gt;laragine built the module &amp;amp; units with all CRUD functionalities also built *&lt;/em&gt;(Migrations - factories - tests - controllers - models)&lt;/strong&gt; all you have to do is to just include the link in route files, awesome, right!&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll just create a &lt;strong&gt;post for a blog&lt;/strong&gt; with &lt;strong&gt;fully CRUD functionalities&lt;/strong&gt; so we'll create a &lt;strong&gt;module&lt;/strong&gt; called &lt;strong&gt;blog&lt;/strong&gt; then we'll create a &lt;strong&gt;unit&lt;/strong&gt; called &lt;strong&gt;post&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  STEP 1: install laravel 8
&lt;/h1&gt;

&lt;p&gt;To install the latest laravel framework, which is laravel 8.0 as of the time of publishing this article, run the command below&lt;br&gt;
&lt;code&gt;composer create-project --prefer-dist laravel/laravel laravel_8&lt;/code&gt;&lt;br&gt;
This will automatically create a laravel 8 app and some couple of things have been set up, we don’t need to copy and rename the env.example file, Laravel 8 does that automatically for us.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbbf9i8ponxtgnobhugse.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbbf9i8ponxtgnobhugse.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another important thing about Laravel 8, you don’t need to generate APP_KEY, this new version will also generate it for us.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcc64d6ay2nn5d8magvja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcc64d6ay2nn5d8magvja.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With that all set up, our app is ready.&lt;/p&gt;

&lt;h1&gt;
  
  
  STEP 2: Database setup
&lt;/h1&gt;

&lt;p&gt;Create an empty database, Open the .env file, and update your database configurations.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futel0qnxegkkjsifjatk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futel0qnxegkkjsifjatk.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  STEP 3: Require Laragine package
&lt;/h1&gt;

&lt;p&gt;Let us install Laragine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;composer require yepwoo/laragine&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfww5wnihld1je6e9nyl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfww5wnihld1je6e9nyl.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  STEP 4: Install the package
&lt;/h1&gt;

&lt;p&gt;After including Laragine, you have to install it by running the following command:&lt;br&gt;
&lt;code&gt;php artisan laragine:install&lt;/code&gt;&lt;br&gt;
it's an initial command for &lt;strong&gt;Laragine&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54nlvxkwnztiv5vmz7n7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54nlvxkwnztiv5vmz7n7.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;p&gt;After running the command, the &lt;strong&gt;Laragine&lt;/strong&gt; directory will be in the root directory under &lt;code&gt;core&lt;/code&gt; directory.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8422oqxffrq1i844htcv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8422oqxffrq1i844htcv.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to know more information about the package visit the &lt;a href="https://yepwoo.com/products/laragine/docs/v2/introduction" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  STEP 5: Create a blog module
&lt;/h1&gt;

&lt;p&gt;Run the following command and specify the name of the module in our case will be &lt;code&gt;blog&lt;/code&gt;&lt;br&gt;
&lt;code&gt;php artisan laragin:module blog&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Any module will be added under &lt;code&gt;core directory&lt;br&gt;
After running the command, the **blog** directory will be in the&lt;/code&gt;core` directory.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7i4u8zftg43gnt4g7iem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7i4u8zftg43gnt4g7iem.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  STEP 6: Create unit
&lt;/h1&gt;

&lt;p&gt;After creating our module (&lt;code&gt;blog&lt;/code&gt;) we need to create a &lt;code&gt;post&lt;/code&gt;, right?&lt;br&gt;
The unit command consists of 2 commands&lt;br&gt;
&lt;strong&gt;Init command&lt;/strong&gt;: &lt;br&gt;
Creates all basic files and will create a JSON file that we'll specify the attributes that we want to add it to the database, we should specify the name of the module that we want to add the unit under it, which is &lt;code&gt;blog&lt;/code&gt; in this example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second command&lt;/strong&gt;: &lt;br&gt;
it's the same command without &lt;strong&gt;init option&lt;/strong&gt;, the command will automatically create all the following files depending on the data that we specified in the &lt;code&gt;JSON&lt;/code&gt; file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Migration&lt;/li&gt;
&lt;li&gt;Requests&lt;/li&gt;
&lt;li&gt;Resources&lt;/li&gt;
&lt;li&gt;Factories&lt;/li&gt;
&lt;li&gt;unit tests&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;let's run the commands, we should specify &lt;code&gt;name of the module&lt;/code&gt; that we want to create the unit under it &amp;amp; the &lt;code&gt;name of unit&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan laragin:unit post --module=blog --init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We include &lt;code&gt;--init&lt;/code&gt; because it's the first part of &lt;strong&gt;unit command&lt;/strong&gt;&lt;br&gt;
After running the command it'll generate the basic files &lt;code&gt;Controller (API - web) - Model&lt;/code&gt; &amp;amp; also the &lt;code&gt;JSON&lt;/code&gt; file that we'll write our attributes in it.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr46qnp8zxccv9o8a03ud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr46qnp8zxccv9o8a03ud.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now we should specify our attributes in the &lt;code&gt;Post.json&lt;/code&gt; file, let's first know what the attributes that we need!
let's start with the basics in this article &lt;strong&gt;I just want to show you how to use the package&lt;/strong&gt;, &lt;strong&gt;you can add any amount of attributes you want&lt;/strong&gt;, any &lt;strong&gt;post&lt;/strong&gt; have &lt;code&gt;title, body, thumbnail&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;p&gt;if we don't put the attribute as &lt;code&gt;nullable&lt;/code&gt; will be &lt;code&gt;required&lt;/code&gt; by default&lt;/p&gt;

&lt;h1&gt;
  
  
  Attributes:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;title           -&amp;gt; type: &lt;code&gt;string&lt;/code&gt;, definition: &lt;code&gt;unique&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;body         -&amp;gt; type: &lt;code&gt;text&lt;/code&gt;, &lt;/li&gt;
&lt;li&gt;image       -&amp;gt; type: &lt;code&gt;string&lt;/code&gt;, definition: &lt;code&gt;nullable&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now let's go to the JSON file which is in &lt;code&gt;core/blog/data/Post.json&lt;/code&gt; to write our attributes.&lt;/p&gt;

&lt;h1&gt;
  
  
  Note
&lt;/h1&gt;

&lt;p&gt;we should follow &lt;code&gt;rules&lt;/code&gt; when writing any attribute in &lt;code&gt;JSON&lt;/code&gt; file, there are two types of configuration &lt;code&gt;type &amp;amp; definition&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;type: &lt;/code&gt; is the type of attribute you &lt;strong&gt;should&lt;/strong&gt; write it as &lt;code&gt;Laravel&lt;/code&gt; specified in docs you can check all types in Laravel from &lt;a href="https://laravel.com/docs/8.x/migrations#available-column-types" rel="noopener noreferrer"&gt;here&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;definition: &lt;/code&gt; is for column modifier also you &lt;strong&gt;should&lt;/strong&gt; write it as `Laravel specified in the docs you can check it from &lt;a href="https://laravel.com/docs/8.x/migrations#column-modifiers" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1644342945921%2FHmv98vYaKx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1644342945921%2FHmv98vYaKx.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if you realized that I didn't write &lt;code&gt;required&lt;/code&gt; because the package will add it automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's run the second part of &lt;code&gt;unit command&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;php artisan laragin:unit post --module=blog&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After running the command it'll generate &lt;code&gt;migrations - requests - resources - factories - unit tests - etc...&lt;/code&gt; files and they are fully implemented.&lt;/p&gt;

&lt;p&gt;let's see the &lt;code&gt;migration&lt;/code&gt; file, you'll see all &lt;code&gt;attributes&lt;/code&gt; are added automatically with the configuration that we specified in &lt;code&gt;JSON&lt;/code&gt; file, magic, right🧐!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1644343098936%2F3rxJ-GLmRV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1644343098936%2F3rxJ-GLmRV.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now let's run &lt;code&gt;migrate command&lt;/code&gt;
&lt;code&gt;php artisan migrate&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  STEP 7: Add API route
&lt;/h2&gt;

&lt;p&gt;add &lt;code&gt;Route::apiResource('posts', 'PostController');&lt;/code&gt; in &lt;code&gt;api.php&lt;/code&gt; in &lt;code&gt;core\Blog\routes\api.php&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwc9crekxwghw6qa88id.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwc9crekxwghw6qa88id.png" alt="image"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;we don't need to implement &lt;code&gt;CRUD&lt;/code&gt; methods, it's aleardy implemented in &lt;code&gt;PostController&lt;/code&gt; in &lt;code&gt;core\Blog\Controllers\API\PostController&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  STEP 8: Testing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;open &lt;code&gt;Postman&lt;/code&gt; or any other software you use to test the &lt;code&gt;API&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;let's first create a new post&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8mhlqy3f46jwtfwefpg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8mhlqy3f46jwtfwefpg.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;let's create another post but without including the &lt;code&gt;title&lt;/code&gt; to just test if it'll return &lt;code&gt;error&lt;/code&gt; or not&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nyegieb62g1uu9tyt8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nyegieb62g1uu9tyt8z.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you're wondering how it gives us that the &lt;code&gt;title&lt;/code&gt; attribute is required, right 🤔? let's see &lt;code&gt;PostRequest&lt;/code&gt; file in &lt;code&gt;core/Blog/Requests&lt;/code&gt;, all attributes that we specefied is in the file with some &lt;code&gt;validation&lt;/code&gt;, &lt;code&gt;Laragine&lt;/code&gt; does this job for us.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  note
&lt;/h1&gt;

&lt;p&gt;you can modify any attribute you want in &lt;code&gt;request file&lt;/code&gt; or in any other file &lt;code&gt;Resources - unit test - etc...&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1644343294725%2FMYi9cmLKm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1644343294725%2FMYi9cmLKm.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Let's &lt;code&gt;get&lt;/code&gt; all &lt;code&gt;posts&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i40ho03145hujebw1uy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i40ho03145hujebw1uy.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's &lt;code&gt;update&lt;/code&gt; the post&lt;br&gt;
before testing update method, you may want to change the &lt;code&gt;validation&lt;/code&gt; in the update request &lt;strong&gt;(put)&lt;/strong&gt; and you can do this from &lt;code&gt;PostRequest&lt;/code&gt; in &lt;code&gt;core/Blog/Requests&lt;/code&gt; file in &lt;code&gt;put&lt;/code&gt; method&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvx6n0t729k3cg8tsm02w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvx6n0t729k3cg8tsm02w.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let's &lt;code&gt;delete&lt;/code&gt; the post
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwsrme8a39707kytnfq5b.png" alt="image"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;in this article I just showed you &lt;code&gt;one&lt;/code&gt; feature of &lt;strong&gt;Laragine&lt;/strong&gt; package, in the &lt;strong&gt;next tutorial&lt;/strong&gt; I'll teach you how to use&lt;br&gt;
&lt;code&gt;unit tests&lt;/code&gt; by just making a small configuration.&lt;/p&gt;

&lt;p&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/abdlrahmansaber/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>api</category>
      <category>testing</category>
      <category>php</category>
    </item>
  </channel>
</rss>
