User contributions for Admin
10 June 2024
- 15:1215:12, 10 June 2024 diff hist +361 N How to Write an Event Handler in Phoenix Created page with "==Example== <source> defmodule AppWeb.PageLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, socket} end def handle_event("run", unsigned_params, socket) do IO.inspect "It works!" {:noreply, socket} end def render(assigns) do ~H""" <p phx-click="run">TEST</p> """ end end </source>" current
- 01:4801:48, 10 June 2024 diff hist +66 N Phoenix Live View Redirect Created page with "<source> {:noreply, redirect(socket, to: "/download")} </source>" current
9 June 2024
- 15:1615:16, 9 June 2024 diff hist +625 User:Admin No edit summary
- 15:1515:15, 9 June 2024 diff hist +6 Elixir Phoenix SSH No edit summary
- 15:1515:15, 9 June 2024 diff hist +548 N Elixir Phoenix SSH Created page with "These are ways to SSH into a server using Elixir/Phoenix. Using the librarian library you can do this: <source> SSH.connect!("test.laptop.local", username: "username", password: "passs", silently_accept_hosts: true) </source> If server has a private key: <source> SSH.connect( "server.host", user: "server.user", port: "server.port", identity: "identity path eg: ~/.ssh/id_rsa_nop", save_accepted_host: false, silen..."
8 June 2024
- 23:5223:52, 8 June 2024 diff hist +189 How to Upload Files to Phoenix No edit summary
6 June 2024
- 18:2618:26, 6 June 2024 diff hist +23 How to Upload Files to Phoenix No edit summary
- 18:1518:15, 6 June 2024 diff hist +2,408 N How to Upload Files to Phoenix Created page with "==Working Live View Example == <source> # lib/my_app_web/live/upload_live.ex defmodule AppWeb.PageLive do use AppWeb, :live_view @impl Phoenix.LiveView def mount(_params, _session, socket) do {:ok, socket |> assign(:uploaded_files, []) |> allow_upload(:avatar, accept: ~w(.json), max_entries: 1)} end @impl Phoenix.LiveView def handle_event("validate", _params, socket) do {:noreply, socket} end @impl Phoenix.LiveView def handle_ev..."
5 June 2024
- 15:5115:51, 5 June 2024 diff hist +272 N How to Download a Static File from Phoenix Created page with "<source> defmodule AppWeb.PageController do use AppWeb, :controller def home(conn, _params) do path = Application.app_dir(:app, "priv/test.json") #static directory send_download(conn, {:file, path}) render(conn, :home, layout: false) end end </source>" current
24 May 2024
- 14:3914:39, 24 May 2024 diff hist +242 User:Admin No edit summary
2 May 2024
- 16:4216:42, 2 May 2024 diff hist +90 N Retroactively Change Data Type of Table Field (Phoenix / Ecto) Created page with "Example: <source> alter table(:name_of_table) do modify :content, :binary end </source>" current
29 April 2024
- 10:1610:16, 29 April 2024 diff hist +279 N Non-Blocking Error Check Example Created page with "Example of error checking using the ElixirRss module. <source> def fetch_and_parse(rss) do case ElixirRes.fetch_and_parse(rss) do {:ok, _response} = out -> out {:error, _} = err -> err end rescue e -> dbg(e) {:error, :unknown} end </source>" current
25 April 2024
- 20:1920:19, 25 April 2024 diff hist +63 N Phoenix CORS (Cross Origin Resource Sharing) Created page with "https://victorbjorklund.com/cors-error-phoenix-elixir-cors-plug" current
19 April 2024
- 17:3617:36, 19 April 2024 diff hist +107 User:Admin No edit summary
18 April 2024
- 20:1220:12, 18 April 2024 diff hist +48 User:Admin No edit summary
- 18:1218:12, 18 April 2024 diff hist +679 User:Admin No edit summary
- 18:0718:07, 18 April 2024 diff hist −72 User:Admin No edit summary
- 18:0718:07, 18 April 2024 diff hist +375 User:Admin No edit summary
- 18:0518:05, 18 April 2024 diff hist +688 User:Admin No edit summary
5 April 2024
- 16:1216:12, 5 April 2024 diff hist +57 How to Generate a UML Block Diagram of Ecto Database No edit summary current
- 16:0916:09, 5 April 2024 diff hist +145 N How to Generate a UML Block Diagram of Ecto Database Created page with "The ecto_erd module lets you generate a block diagram image of your schema by only using a few easy commands. https://github.com/fuelen/ecto_erd"
16 March 2024
- 04:4304:43, 16 March 2024 diff hist +11 Understanding Forms and Changesets No edit summary
15 March 2024
- 01:1601:16, 15 March 2024 diff hist +817 Understanding Forms and Changesets No edit summary
- 01:1201:12, 15 March 2024 diff hist +53 Understanding Forms and Changesets No edit summary
- 01:0701:07, 15 March 2024 diff hist +179 Understanding Forms and Changesets No edit summary
- 01:0301:03, 15 March 2024 diff hist +19 Understanding Forms and Changesets →Creating an HTML Form and Post Request
- 00:5800:58, 15 March 2024 diff hist +785 Understanding Forms and Changesets No edit summary
- 00:5200:52, 15 March 2024 diff hist +27 Understanding Forms and Changesets No edit summary
- 00:5000:50, 15 March 2024 diff hist −5,864 Understanding Forms and Changesets No edit summary
- 00:5000:50, 15 March 2024 diff hist +15 Router No edit summary current
- 00:4500:45, 15 March 2024 diff hist +6 Router No edit summary
- 00:4500:45, 15 March 2024 diff hist −1 Router No edit summary
- 00:4400:44, 15 March 2024 diff hist +208 N Router Created page with "In Elixir Phoenix this is the file responsible for "routing" endpoint requests to data. When you create a new phoenix application named "app" the router is in this directory: '''app/lib/app_web/router.ex'''"
- 00:3600:36, 15 March 2024 diff hist −601 Understanding Forms and Changesets No edit summary
14 March 2024
- 20:0820:08, 14 March 2024 diff hist −4 User:Admin No edit summary
- 20:0520:05, 14 March 2024 diff hist +83 User:Admin No edit summary
- 20:0220:02, 14 March 2024 diff hist +71 User:Admin No edit summary
- 19:3119:31, 14 March 2024 diff hist +929 User:Admin No edit summary
- 03:0003:00, 14 March 2024 diff hist +117 Add an HTML Page to Elixir Phoenix No edit summary current
- 02:5802:58, 14 March 2024 diff hist −31 Add an HTML Page to Elixir Phoenix No edit summary
- 02:3602:36, 14 March 2024 diff hist +25 Add an HTML Page to Elixir Phoenix No edit summary
- 02:3402:34, 14 March 2024 diff hist +2 Add an HTML Page to Elixir Phoenix No edit summary
- 02:3302:33, 14 March 2024 diff hist +6 Add an HTML Page to Elixir Phoenix No edit summary
- 02:3302:33, 14 March 2024 diff hist 0 Add an HTML Page to Elixir Phoenix No edit summary
- 02:3302:33, 14 March 2024 diff hist +1,871 N Add an HTML Page to Elixir Phoenix Created page with "This tutorial describes how to render an HTML page in Elixir Phoenix. THis tutorial does not use Liveview. ==Create the Route== In '''app/appweb/router.ex''' set a route. In the example below, the route is a get request and the endpoint is '''/landing'''. Assign a Controller, in the code below this is '''PageController'''. In the third argument, set an atom that will be the name of the HTML page, in this case it is '''index'''. <source> get "/landing", PageControl..."
9 March 2024
- 05:0405:04, 9 March 2024 diff hist +6 Understanding Forms and Changesets No edit summary
- 05:0305:03, 9 March 2024 diff hist +726 Understanding Forms and Changesets No edit summary
29 January 2024
- 21:1821:18, 29 January 2024 diff hist +92 User talk:Admin No edit summary
- 21:1421:14, 29 January 2024 diff hist +69 User talk:Admin No edit summary
- 21:1321:13, 29 January 2024 diff hist +129 User talk:Admin No edit summary