User contributions for Admin
29 January 2026
- 00:1400:14, 29 January 2026 diff hist +10,512 Live view and handle info No edit summary current
- 00:1100:11, 29 January 2026 diff hist +5,138 N Live view and handle info Created page with "= Phoenix LiveView handle_info Guide for Web Developers = == What is handle_info? == handle_info is Phoenix LiveView's way of handling messages sent to the LiveView process from outside normal user interactions (like clicks). It's your LiveView's inbox for asynchronous events. In traditional web development, everything is request-response: user clicks, server responds, done. But LiveView processes are long-running and can receive messages from other parts of your syst..."
28 November 2025
- 02:3602:36, 28 November 2025 diff hist +5,617 Genserver No edit summary current
1 September 2025
- 18:3118:31, 1 September 2025 diff hist +1,226 How to Create a Basic PubSub Application No edit summary current
31 August 2025
- 05:0805:08, 31 August 2025 diff hist −1,346 Welcome to ElixirBlocks No edit summary current
29 August 2025
- 01:0201:02, 29 August 2025 diff hist +203 N How to Fetch a GET request like in Javascript Created page with " <source> defmodule App do # Install Req from hex def fetch do task = Task.async(fn -> Req.get!("https://api.github.com/repos/wojtekmach/req") end) Task.await(task) end end </source>" current
31 July 2025
- 14:5814:58, 31 July 2025 diff hist +1,302 N Liveview Text Search and Highlight Example App Created page with "<source> # lib/my_app_web/live/json_search_live.ex defmodule AppWeb.SandboxLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, assign(socket, text: "Hello world! This is a test. Hello again!", search: "")} end def handle_event("search_change", %{"value" => search}, socket) do {:noreply, assign(socket, search: search)} end def handle_event("text_change", %{"value" => text}, socket) do {:noreply, assign(socket, text: text..." current
16 July 2025
- 16:1016:10, 16 July 2025 diff hist +1 Postgres Setup No edit summary current
- 16:0916:09, 16 July 2025 diff hist +3 Postgres Setup No edit summary
- 16:0916:09, 16 July 2025 diff hist +472 Postgres Setup No edit summary
25 June 2025
- 19:2719:27, 25 June 2025 diff hist +91 User:Admin No edit summary current
10 May 2025
- 07:0007:00, 10 May 2025 diff hist +720 N LiveView Web API Request Example Created page with "<source> defmodule AppWeb.Sandbox do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, socket} end def handle_event("start_task", _params, socket) do Task.async(fn -> Req.get!("https://api.github.com/repos/wojtekmach/req") end) {:noreply, socket} end def handle_info({ref, result}, socket) do Process.demonitor(ref, [:flush]) IO.inspect"________________________________________________________________________________"..." current
- 05:1505:15, 10 May 2025 diff hist +793 N Phoenix Handle Info Self Example Created page with "<source> defmodule AppWeb.Sandbox do use AppWeb, :live_view require Logger def mount(_params, _session, socket) do {:ok, assign(socket, :count, 0)} end def handle_event("increment", _params, socket) do # Send a message to ourselves after 1000 milliseconds (1 second) Process.send_after(self(), :delayed_increment, 1000) {:noreply, socket} end def handle_info(:delayed_increment, socket) do new_count = socket.assigns.count + 1 Logger...." current
17 April 2025
- 20:1720:17, 17 April 2025 diff hist +24 Sort Collection Via Event Handler No edit summary current
- 19:5519:55, 17 April 2025 diff hist +1,388 N Sort Collection Via Event Handler Created page with "<source> defmodule AppWeb.SandboxLive do use AppWeb, :live_view alias App.TestBeds alias App.TestBeds.TestBed alias App.Repo import Ecto.Query def mount(_params, _session, socket) do testbeds = Repo.all(from(t in TestBed, order_by: t.name)) {:ok, assign(socket, testbeds: testbeds, sort_by: :name, sort_direction: :asc)} end def handle_event("toggle_sort_by_name", _params, socket) do current_direction = socket.assigns.sort_direction new_..."
16 April 2025
- 15:2415:24, 16 April 2025 diff hist +884 N Live View Store Data in URL Params Created page with "<source> defmodule AppWeb.PageLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, socket} end def handle_params(params, _uri, socket) do count = String.to_integer(params["count"] || "0") {:noreply, assign(socket, count: count)} end def handle_event("increment", _, socket) do new_count = socket.assigns.count + 1 # Use ~p instead of Routes {:noreply, push_patch(socket, to: ~p"/?count=#{new_count}")} end d..." current
8 April 2025
- 00:3300:33, 8 April 2025 diff hist −267 How to Create Nested LiveView Components No edit summary current
2 April 2025
- 20:4220:42, 2 April 2025 diff hist +823 User:Admin No edit summary
- 20:3220:32, 2 April 2025 diff hist +794 User:Admin No edit summary
- 18:4218:42, 2 April 2025 diff hist +1,833 User:Admin No edit summary
- 18:4118:41, 2 April 2025 diff hist +893 User:Admin No edit summary
23 March 2025
- 21:4221:42, 23 March 2025 diff hist +1,322 Understanding Forms and Changesets No edit summary current
- 20:5220:52, 23 March 2025 diff hist +3,047 Understanding Forms and Changesets No edit summary
- 18:3218:32, 23 March 2025 diff hist +1,324 Understanding Forms and Changesets No edit summary
- 03:3403:34, 23 March 2025 diff hist +2,725 Understanding Forms and Changesets No edit summary
- 02:2802:28, 23 March 2025 diff hist +1,052 Understanding Forms and Changesets No edit summary
22 March 2025
- 22:0722:07, 22 March 2025 diff hist −1 Understanding Forms and Changesets No edit summary
- 22:0622:06, 22 March 2025 diff hist +1,766 Understanding Forms and Changesets No edit summary
19 March 2025
- 14:0814:08, 19 March 2025 diff hist +70 Understanding Forms and Changesets No edit summary
- 00:5000:50, 19 March 2025 diff hist +1,727 Understanding Forms and Changesets No edit summary
13 March 2025
- 18:3218:32, 13 March 2025 diff hist +1,393 How to Create Nested LiveView Components No edit summary
12 March 2025
- 14:4414:44, 12 March 2025 diff hist +1,583 Working with Sibling Components No edit summary current
- 13:5913:59, 12 March 2025 diff hist +1,151 N Working with Sibling Components Created page with "<source> defmodule Heading do use Phoenix.Component def head(assigns) do ~H""" <ul> <%= for heading <- @headings do %> <li phx-click="append_content" phx-value-heading={heading}>{heading}!</li> <% end %> </ul> """ end end #________________________________________________________________ defmodule Content do use Phoenix.Component def content(assigns) do ~H""" <p>This is content: {@content}!</p> """ end end #__..."
- 09:3809:38, 12 March 2025 diff hist +473 User:Admin No edit summary
11 March 2025
- 20:4720:47, 11 March 2025 diff hist +72 User:Admin No edit summary
- 20:0320:03, 11 March 2025 diff hist +87 User:Admin No edit summary
20 February 2025
- 23:2123:21, 20 February 2025 diff hist +208 User:Admin No edit summary
- 21:3221:32, 20 February 2025 diff hist +1,262 User:Admin No edit summary
29 December 2024
- 10:3010:30, 29 December 2024 diff hist +189 Understanding Forms and Changesets No edit summary
27 December 2024
- 09:2109:21, 27 December 2024 diff hist +419 N How to Think About Phoenix Dead Views Created page with "Each page (resource) has a route. These routes are assigned a controller and a function from that controller. In the code below, when a user goes to the "/" route a controller named PageController is found and a function named home is invoked. Controllers are simply modules and the third argument (in this case named '''home''') is a function on the controller. <source> get "/", PageController, :home </source>" current
- 09:1209:12, 27 December 2024 diff hist +39 Phoenix Flash Message No edit summary current
- 09:1209:12, 27 December 2024 diff hist +8 Phoenix Flash Message No edit summary
- 09:1109:11, 27 December 2024 diff hist +625 N Phoenix Flash Message Created page with "In Phoenix the flash message is invoked from the controller. <source> def create(conn, %{"doink" => doink_params}) do case Doinks.create_doink(doink_params) do {:ok, doink} -> conn |> put_flash(:info, "Doink created successfully.") |> redirect(to: ~p"/doinks/#{doink}") {:error, %Ecto.Changeset{} = changeset} -> render(conn, :new, changeset: changeset) end end </source> The message itself needs to be in the view..."
24 December 2024
- 03:2103:21, 24 December 2024 diff hist +1,278 User:Admin No edit summary
- 02:4702:47, 24 December 2024 diff hist +125 User:Admin No edit summary
23 December 2024
- 01:0901:09, 23 December 2024 diff hist +114 User:Admin No edit summary
- 01:0801:08, 23 December 2024 diff hist +62 User:Admin No edit summary
- 00:5700:57, 23 December 2024 diff hist +342 User:Admin No edit summary
8 December 2024
- 02:1602:16, 8 December 2024 diff hist +46 N Update Phoenix Generator Created page with "<pre> mix archive.install hex phx_new </pre>" current
29 November 2024
- 07:0407:04, 29 November 2024 diff hist +174 User:Admin No edit summary